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 | |
parent | 9b397609f10d7b61282442ee081e3c1e23430a29 (diff) | |
download | idalius-a5316e514b05f8f0bb9dc745ede654a968e41cc1.tar.xz |
Add topic change command
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | idalius.pl | 10 |
2 files changed, 16 insertions, 0 deletions
@@ -121,6 +121,12 @@ idalius to contact services like nickserv, memoserv, chanserv etc. Not really useful apart from having a laugh in a channel. Really not sure why I added this except for a lame gag or two. Worth it. +### Set channel topic + + topic #channel new topic + +Does what it says on the tin. + ### Set channel/user modes mode #channel +v someone @@ -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) { |