From be164408bab4128c4e67b6ac2e0f0183702c1790 Mon Sep 17 00:00:00 2001 From: Rich Healey Date: Fri, 7 Jan 2011 14:13:41 +1100 Subject: - is a valid character in a channel name. --- auto-server/auto_server.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'auto-server') diff --git a/auto-server/auto_server.pl b/auto-server/auto_server.pl index a9f6645..447a131 100644 --- a/auto-server/auto_server.pl +++ b/auto-server/auto_server.pl @@ -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"); } -- cgit v1.2.3 From 0ddd64b6e0405af84a95e5e5fce9d0840fa74da5 Mon Sep 17 00:00:00 2001 From: richo Date: Mon, 18 Jul 2011 12:52:26 +1000 Subject: Retrieve channel data before attempting to work out channel list --- auto-server/auto_server.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'auto-server') diff --git a/auto-server/auto_server.pl b/auto-server/auto_server.pl index 447a131..3d10272 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? -- cgit v1.2.3 From 598a08d34b56796e5673292df2ab1632002ac1a7 Mon Sep 17 00:00:00 2001 From: richo Date: Mon, 18 Jul 2011 12:54:36 +1000 Subject: Only attempt join if channel exists --- auto-server/auto_server.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'auto-server') 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}}; + } } -- cgit v1.2.3