diff options
-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) { |