From 3f2da46f575e19f62244263826bfcb29535d130d Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 9 Mar 2017 12:19:57 +1300 Subject: Parse part message with spaces in it --- saxrobot | 7 ++++--- 1 file 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]"); } -- cgit v1.1