From 8c9677c6224130f2ea138274b46814a27e7e70e8 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 21 Sep 2017 18:27:13 +1200 Subject: Add puppet kicking, reason optional Fixes #3 --- idalius.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 "); } } + 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 [reason]"); + } + } if ($what =~ /^reconnect/) { my ($reason) = $what =~ /^reconnect\s+(.+)$/; $irc->yield(privmsg => $nick => "Doing that now"); -- cgit v1.1