diff options
author | David Phillips <david@sighup.nz> | 2017-09-21 18:27:13 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-09-21 18:27:13 +1200 |
commit | 8c9677c6224130f2ea138274b46814a27e7e70e8 (patch) | |
tree | e2a72ab8d10b20e4fe68a1cdcbd94631b4237fe9 | |
parent | 2242e761b79740056fd4306841c6d548f800e2f0 (diff) | |
download | idalius-8c9677c6224130f2ea138274b46814a27e7e70e8.tar.xz |
Add puppet kicking, reason optional
Fixes #3
-rwxr-xr-x | idalius.pl | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -192,6 +192,16 @@ sub irc_msg { $irc->yield(privmsg => $nick => "Syntax: action <channel> <action text>"); } } + if ($what =~ /^kick\s/) { + my ($channel, $kickee, undef, $reason) = $what =~ /^kick\s+(\S+)\s(\S+)((?:\s)(.*))?$/; + if ($channel and $kickee) { + $reason = "Requested by $nick" unless $reason; + $irc->yield(kick => $channel => $kickee => $reason); + $irc->yield(privmsg => $nick => "Requested."); + } else { + $irc->yield(privmsg => $nick => "Syntax: kick <channel> <nick> [reason]"); + } + } if ($what =~ /^reconnect/) { my ($reason) = $what =~ /^reconnect\s+(.+)$/; $irc->yield(privmsg => $nick => "Doing that now"); |