aboutsummaryrefslogtreecommitdiff
path: root/saxrobot
diff options
context:
space:
mode:
Diffstat (limited to 'saxrobot')
-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]");
}