From 9b733e2023861921713489a0c2ba523bc5d1dfa7 Mon Sep 17 00:00:00 2001 From: pdbogen Date: Wed, 26 Mar 2008 14:54:14 +0000 Subject: [PATCH] Fix the join-on-connect for channels with keys git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@40 088b83a4-0077-4247-935c-42ec02c2848b --- irc.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/irc.pl b/irc.pl index f9015bc..53fb058 100644 --- a/irc.pl +++ b/irc.pl @@ -156,7 +156,14 @@ sub on_connect { for my $chan (split( /,/, $self->{ "channel" } )) { my @args = split( /:/, $chan ); my $chanName = shift @args; - $_[KERNEL]->post( $heap->{ 'ircobject' }->session_id(), "join", $chan, @args ); + print( "IRC : Connecting to $chanName" ); + if( $#args >= 0 ) { + print( " with arguments ".join( ',', @args ), "\n" ); + $_[KERNEL]->post( $heap->{ 'ircobject' }->session_id(), "join", $chanName, @args ); + } else { + print( "\n" ); + $_[KERNEL]->post( $heap->{ 'ircobject' }->session_id(), "join", $chanName ); + } } } -- 2.11.0