#
# OnJoin.pl: emit a message when a user enters the channel
# Author: Corey Edwards <tensai@zmonkey.org>
#
# OnJoin.pl: emit a message when a user enters the channel
# Author: Corey Edwards <tensai@zmonkey.org>
# set and get messages
sub Cmdonjoin {
$_ = shift;
# set and get messages
sub Cmdonjoin {
$_ = shift;
- m/(\S*)( (\S*)( (.*)|)|)/;
+ m/(\S*)(\s*(\S*)(\s*(.*)|)|)/;
my $ch = $1;
my $nick = $3;
my $msg = $5;
my $ch = $1;
my $nick = $3;
my $msg = $5;
# see if they specified a channel
if ($ch !~ m/^\#/ && $ch ne '_default'){
# see if they specified a channel
if ($ch !~ m/^\#/ && $ch ne '_default'){
+ $msg = $nick . ($msg ? " $msg" : '');
$nick = $ch;
$ch = $chan;
}
$nick = $ch;
$ch = $chan;
}