diff options
Diffstat (limited to 'auto-server/auto_server.pl')
-rw-r--r-- | auto-server/auto_server.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/auto-server/auto_server.pl b/auto-server/auto_server.pl index 8676726..77ba527 100644 --- a/auto-server/auto_server.pl +++ b/auto-server/auto_server.pl @@ -108,7 +108,7 @@ sub parse_channel_map { Irssi::active_win->print("Could not process channel => server mappings"); $channel_map = {}; } - _debug_print Dumper($channel_map); + #_debug_print Dumper($channel_map); bind_completion(); } @@ -150,6 +150,8 @@ sub join_plus { return; } # TODO: search values() and give a 'did you mean' for closest channel + # TODO: Fuzzy match for ## channels (Would be nice to hax at teh tab + # completion too) # check if we're connected to that server my $server = Irssi::server_find_tag($server_id); @@ -177,6 +179,8 @@ sub join_plus { # check if we're already on the required channel my $on_channel = $server->channel_find($channel); + # FIXME + # Should this be $on_channel? Need docs.. if (defined $channel && ref($channel) eq 'Irssi::Irc::Channel') { Irssi::active_win()->print("You are already connected to " . " $channel on " . $server->{tag}); @@ -193,11 +197,14 @@ sub join_plus { _debug_print ("awaiting connection for join"); $pending_joins->{$server_id} = $channel; + # This comes tumbling down if the server doesn't have a MOTD. + # is that RFC required? Irssi::signal_add_last("event 376", 'do_channel_join'); } } sub do_channel_join { + Irssi::signal_remove("event 376", 'do_channel_join'); my ($serv) = @_; #_debug_print("server is " . Dumper($serv)); _debug_print(sprintf("server is %s (%s)", $serv->{address}, $serv->{tag})); |