aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-09-21 18:27:13 +1200
committerDavid Phillips <david@sighup.nz>2017-09-21 18:27:13 +1200
commit8c9677c6224130f2ea138274b46814a27e7e70e8 (patch)
treee2a72ab8d10b20e4fe68a1cdcbd94631b4237fe9
parent2242e761b79740056fd4306841c6d548f800e2f0 (diff)
downloadidalius-8c9677c6224130f2ea138274b46814a27e7e70e8.tar.xz
Add puppet kicking, reason optional
Fixes #3
-rwxr-xr-xidalius.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/idalius.pl b/idalius.pl
index 5b7db29..42475fc 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -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");