aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-05-21 20:19:14 +1200
committerDavid Phillips <david@sighup.nz>2017-05-21 20:19:14 +1200
commit9358edb20715afc4d497d35bb9b07f3429d22da7 (patch)
tree1802f726758cfb9aa822a7f567c48a7400066bc9
parent68a5dbff5f6463e2f8cc0e5a973bcf3eac07c570 (diff)
downloadidalius-9358edb20715afc4d497d35bb9b07f3429d22da7.tar.xz
Add responses on successful admin command requests
-rwxr-xr-xidalius.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/idalius.pl b/idalius.pl
index 9c1483b..9ac4138 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -139,6 +139,7 @@ sub irc_msg {
my ($channel) = $what =~ /^nick\s+(\S+)$/;
if ($channel) {
$irc->yield(nick => $channel);
+ $irc->yield(privmsg => $nick => "Requested.");
} else {
$irc->yield(privmsg => $nick => "Syntax: nick <nick>");
}
@@ -150,6 +151,7 @@ sub irc_msg {
my ($chan_str, $reason) = split /\s+(?!#)/, $what, 2;
my @channels = split /\s+/, $chan_str;
$irc->yield(part => @channels => $reason);
+ $irc->yield(privmsg => $nick => "Requested.");
} else {
$irc->yield(privmsg => $nick =>
"Syntax: part <channel1> [channel2 ...] [partmsg]");
@@ -160,6 +162,7 @@ sub irc_msg {
$what =~ s/^join\s+//;
my @channels = split /\s+/, $what;
$irc->yield(join => $_) for @channels;
+ $irc->yield(privmsg => $nick => "Requested.");
} else {
$irc->yield(privmsg => $nick =>
"Syntax: join <channel1> [channel2 ...]");
@@ -169,12 +172,14 @@ sub irc_msg {
my ($channel, $message) = $what =~ /^say\s+(\S+)\s(.*)$/;
if ($channel and $message) {
$irc->yield(privmsg => $channel => $message);
+ $irc->yield(privmsg => $nick => "Requested.");
} else {
$irc->yield(privmsg => $nick => "Syntax: say <channel> <msg>");
}
}
if ($what =~ /^reconnect/) {
my ($reason) = $what =~ /^reconnect\s+(.+)$/;
+ $irc->yield(privmsg => $nick => "Doing that now");
if (!$reason) {
$reason = $config{quit_msg};
}