git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1247
c11ca15a-4712-0410-83d8-
924469b57eb5
#
# 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;
# set and get messages
sub Cmdonjoin {
$_ = shift;
- m/(\S*)( (\S*)( (.*)|)|)/;
+ m/(\S*)(\s*(\S*)(\s*(.*)|)|)/;
my $ch = $1;
my $nick = $3;
my $msg = $5;
# see if they specified a channel
if ($ch !~ m/^\#/ && $ch ne '_default'){
- $msg = $nick;
+ $msg = $nick . ($msg ? " $msg" : '');
$nick = $ch;
$ch = $chan;
}