aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsaxrobot12
1 files changed, 4 insertions, 8 deletions
diff --git a/saxrobot b/saxrobot
index 2928d19..f208284 100755
--- a/saxrobot
+++ b/saxrobot
@@ -103,14 +103,10 @@ sub irc_msg {
}
if ($what =~ /^part\s/) {
my $message;
- my ($channel, $message) = $what =~ /^part\s+(\S+)(\s(.*))?$/;
- if ($channel) {
- if (!$message) {
- $message = "commanded by $nick";
- } else {
- $message =~ s/^\s+//;
- }
- $irc->yield(part => $channel => $message);
+ if ($what =~ /^part(\s+(\S+))+$/m) {
+ my @args = split /\s+/, $what;
+ print for @args;
+ $irc->yield(part => @args);
} else {
$irc->yield(privmsg => $nick => "Syntax: part [partmsg]");
}