diff options
author | David Phillips <david@sighup.nz> | 2017-03-09 12:19:57 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-03-09 12:19:57 +1300 |
commit | 3f2da46f575e19f62244263826bfcb29535d130d (patch) | |
tree | 1b0c65f5e8dbe00f1f0171ea7632ea83d68a5c8a | |
parent | a7c02881a10c6e61d37263cf1d423c27e37c6456 (diff) | |
download | idalius-3f2da46f575e19f62244263826bfcb29535d130d.tar.xz |
Parse part message with spaces in it
-rwxr-xr-x | saxrobot | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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]"); } |