aboutsummaryrefslogtreecommitdiff
path: root/idalius.pl
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-04-10 21:56:09 +1200
committerDavid Phillips <david@sighup.nz>2018-04-10 21:56:09 +1200
commita5316e514b05f8f0bb9dc745ede654a968e41cc1 (patch)
tree3e34a6c50d7c92a448a50acfac73d914d24df1a9 /idalius.pl
parent9b397609f10d7b61282442ee081e3c1e23430a29 (diff)
downloadidalius-a5316e514b05f8f0bb9dc745ede654a968e41cc1.tar.xz
Add topic change command
Diffstat (limited to 'idalius.pl')
-rwxr-xr-xidalius.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/idalius.pl b/idalius.pl
index ea276dd..c88ed8e 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -284,6 +284,16 @@ sub irc_msg {
$irc->yield(privmsg => $nick => "Syntax: action <channel> <action text>");
}
}
+ if ($what =~ /^topic\s/) {
+ my ($channel, $topic) = $what =~ /^topic\s+(\S+)\s(.*)?$/;
+ if ($channel) {
+ $topic = "" unless $topic;
+ $irc->yield(topic => $channel => $topic);
+ $irc->yield(privmsg => $nick => "Requested.");
+ } else {
+ $irc->yield(privmsg => $nick => "Syntax: topic <channel> <topic>");
+ }
+ }
if ($what =~ /^mode\s/) {
my ($rest) = $what =~ /^mode\s+(.*)?$/;
if ($rest) {