aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-03-09 12:19:57 +1300
committerDavid Phillips <david@sighup.nz>2017-03-09 12:19:57 +1300
commit3f2da46f575e19f62244263826bfcb29535d130d (patch)
tree1b0c65f5e8dbe00f1f0171ea7632ea83d68a5c8a
parenta7c02881a10c6e61d37263cf1d423c27e37c6456 (diff)
downloadidalius-3f2da46f575e19f62244263826bfcb29535d130d.tar.xz
Parse part message with spaces in it
-rwxr-xr-xsaxrobot7
1 files changed, 4 insertions, 3 deletions
diff --git a/saxrobot b/saxrobot
index f208284..a1d27d5 100755
--- a/saxrobot
+++ b/saxrobot
@@ -104,9 +104,10 @@ sub irc_msg {
if ($what =~ /^part\s/) {
my $message;
if ($what =~ /^part(\s+(\S+))+$/m) {
- my @args = split /\s+/, $what;
- print for @args;
- $irc->yield(part => @args);
+ $what =~ s/^part\s+//;
+ my ($chan_str, $reason) = split /\s+(?!#)/, $what, 2;
+ my @channels = split /\s+/, $chan_str;
+ $irc->yield(part => @channels => $reason);
} else {
$irc->yield(privmsg => $nick => "Syntax: part [partmsg]");
}