From: timriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5> Date: Fri, 6 Jan 2006 04:32:56 +0000 (+0000) Subject: don't drop part of message when no #channel X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7caa3b3c50b3641795d709181fe52099e62ddc95;p=infobot.git don't drop part of message when no #channel git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1247 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Modules/OnJoin.pl b/src/Modules/OnJoin.pl index 68389b5..5b3fbf6 100644 --- a/src/Modules/OnJoin.pl +++ b/src/Modules/OnJoin.pl @@ -1,9 +1,9 @@ # # OnJoin.pl: emit a message when a user enters the channel # Author: Corey Edwards <tensai@zmonkey.org> -# Version: v0.2 +# Version: v0.2.1 # Created: 20051222 -# Updated: 20060102 +# Updated: 20060105 use strict; @@ -34,7 +34,7 @@ sub onjoin { # set and get messages sub Cmdonjoin { $_ = shift; - m/(\S*)( (\S*)( (.*)|)|)/; + m/(\S*)(\s*(\S*)(\s*(.*)|)|)/; my $ch = $1; my $nick = $3; my $msg = $5; @@ -45,7 +45,7 @@ sub Cmdonjoin { # see if they specified a channel if ($ch !~ m/^\#/ && $ch ne '_default'){ - $msg = $nick; + $msg = $nick . ($msg ? " $msg" : ''); $nick = $ch; $ch = $chan; }