diff options
| author | richo <richo@psych0tik.net> | 2011-07-18 03:36:40 +0000 | 
|---|---|---|
| committer | richo <richo@psych0tik.net> | 2011-07-18 03:36:40 +0000 | 
| commit | e4b9ea15d7abdae8211d18737fa54933f3faf57b (patch) | |
| tree | fda4cc23faebfd1f130578b39fe161fe4c0ba1f8 /auto-server | |
| parent | Added goodnicks from richoH/richos-irssi (diff) | |
| parent | Only attempt join if channel exists (diff) | |
| download | irssi-scripts-e4b9ea15d7abdae8211d18737fa54933f3faf57b.tar.gz irssi-scripts-e4b9ea15d7abdae8211d18737fa54933f3faf57b.zip | |
Merge branch 'master' into richoH-dev
Diffstat (limited to 'auto-server')
| -rw-r--r-- | auto-server/auto_server.pl | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/auto-server/auto_server.pl b/auto-server/auto_server.pl index 0f5a11e..0046340 100644 --- a/auto-server/auto_server.pl +++ b/auto-server/auto_server.pl @@ -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/^(#?[#a-zA-Z0-9-]+)/) {          $channel = $1;          _debug_print ("Channel is: $channel");      } @@ -211,13 +211,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}}; +    }  } | 
