diff options
author | Tom Feist <shabble@metavore.org> | 2011-07-20 08:39:43 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2011-07-20 08:39:43 +0000 |
commit | 06128dbb06ff2b57dd53b6c5ab0bbacd579f1326 (patch) | |
tree | af5c046afacfebe8ce5fd72b33ea74ab950e47a2 /auto-server | |
parent | add additional check to avoid crash if URI doesn't have a 'host' method. (diff) | |
parent | at least on some networks, just a prefix is valid (diff) | |
download | irssi-scripts-06128dbb06ff2b57dd53b6c5ab0bbacd579f1326.tar.gz irssi-scripts-06128dbb06ff2b57dd53b6c5ab0bbacd579f1326.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to '')
-rw-r--r-- | auto-server/auto_server.pl | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/auto-server/auto_server.pl b/auto-server/auto_server.pl index 447a131..ac0cd29 100644 --- a/auto-server/auto_server.pl +++ b/auto-server/auto_server.pl @@ -94,7 +94,7 @@ sub haxy_print_hook { my $data = $_[1]; # Hose control characters $data =~ s/\x04.//g; - if ($data =~ m/^#/) { + if ($data =~ m/^[#&!]/) { my @items = split /\s+/, $data; push(@hack_channels, $items[0]); push(@hack_channels, $items[1]); @@ -104,8 +104,8 @@ sub haxy_print_hook { sub parse_channel_map { #my $data = Irssi::settings_get_str('joinplus_server_maps'); - unbind_completion(); my $data = retrieve_channels(); + unbind_completion(); my @items = split /\s+/, $data; if (@items % 2 == 0) { $channel_map = { @items }; # risky? @@ -135,7 +135,7 @@ sub join_plus { # parse out channel name from args: my $channel; - if ($args =~ m/^(#?[#a-zA-Z0-9-]+)/) { + if ($args =~ m/^([#&!]?[^ ]*)/) { $channel = $1; _debug_print ("Channel is: $channel"); } @@ -209,13 +209,14 @@ sub do_channel_join { my $channel = $pending_joins->{$serv->{address}}; $channel = $pending_joins->{$serv->{tag}} unless $channel; + if ($channel) { + _debug_print ("attempting to join $channel"); - _debug_print ("attempting to join $channel"); + Irssi::server_find_tag($serv->{tag})->command("JOIN $channel"); - Irssi::server_find_tag($serv->{tag})->command("JOIN $channel"); - - delete $pending_joins->{$serv->{address}}; - delete $pending_joins->{$serv->{tag}}; + delete $pending_joins->{$serv->{address}}; + delete $pending_joins->{$serv->{tag}}; + } } |