aboutsummaryrefslogtreecommitdiffstats
path: root/auto-server
diff options
context:
space:
mode:
authorricho <richo@psych0tik.net>2011-07-18 02:54:36 +0000
committerricho <richo@psych0tik.net>2011-07-18 02:54:36 +0000
commit598a08d34b56796e5673292df2ab1632002ac1a7 (patch)
tree6ad4cca41c64c99f8e360fc7d47e3d3d25cc5028 /auto-server
parentRetrieve channel data before attempting to work out channel list (diff)
downloadirssi-scripts-598a08d34b56796e5673292df2ab1632002ac1a7.tar.gz
irssi-scripts-598a08d34b56796e5673292df2ab1632002ac1a7.zip
Only attempt join if channel exists
Diffstat (limited to 'auto-server')
-rw-r--r--auto-server/auto_server.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/auto-server/auto_server.pl b/auto-server/auto_server.pl
index 3d10272..c409e5d 100644
--- a/auto-server/auto_server.pl
+++ b/auto-server/auto_server.pl
@@ -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}};
+ }
}