diff options
author | David Phillips <david@sighup.nz> | 2018-04-10 21:56:09 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2018-04-10 21:56:09 +1200 |
commit | a5316e514b05f8f0bb9dc745ede654a968e41cc1 (patch) | |
tree | 3e34a6c50d7c92a448a50acfac73d914d24df1a9 /idalius.pl | |
parent | 9b397609f10d7b61282442ee081e3c1e23430a29 (diff) | |
download | idalius-a5316e514b05f8f0bb9dc745ede654a968e41cc1.tar.xz |
Add topic change command
Diffstat (limited to 'idalius.pl')
-rwxr-xr-x | idalius.pl | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) { |