From: timriker 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=00e6bdb34fdb1ca06be69932e8d08e6b312b7ffe;p=infobot.git don't drop part of message when no #channel git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1247 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Modules/OnJoin.pl b/blootbot/src/Modules/OnJoin.pl index 68389b5..5b3fbf6 100644 --- a/blootbot/src/Modules/OnJoin.pl +++ b/blootbot/src/Modules/OnJoin.pl @@ -1,9 +1,9 @@ # # OnJoin.pl: emit a message when a user enters the channel # Author: Corey Edwards -# 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; }