aboutsummaryrefslogtreecommitdiffstats
path: root/auto-server
diff options
context:
space:
mode:
Diffstat (limited to 'auto-server')
-rw-r--r--auto-server/auto_server.pl13
1 files changed, 7 insertions, 6 deletions
diff --git a/auto-server/auto_server.pl b/auto-server/auto_server.pl
index 447a131..c409e5d 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?
@@ -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}};
+ }
}