diff options
author | David Phillips <david@sighup.nz> | 2017-03-07 15:02:34 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-03-07 15:02:34 +1300 |
commit | 1fa355a0a01751f5914c7cdcc3cac1eb470a10c2 (patch) | |
tree | b824e9792c2600ad8ed3152b1e686f493c7dadb5 /saxrobot | |
parent | cd701884e59f533e1ce31dc86cc2a3182d36aa64 (diff) | |
download | idalius-1fa355a0a01751f5914c7cdcc3cac1eb470a10c2.tar.xz |
Add simple join/part to remote control
Diffstat (limited to 'saxrobot')
-rwxr-xr-x | saxrobot | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -92,6 +92,22 @@ sub irc_msg { $irc->yield(privmsg => $nick => "I am bot, go away"); return; } + if ($what =~ /^part\s/) { + my ($channel) = $what =~ /^part\s+(\S+)$/; + if ($channel) { + $irc->yield(part => $channel); + } else { + $irc->yield(privmsg => $nick => "Syntax: part <channel>"); + } + } + if ($what =~ /^join\s/) { + my ($channel) = $what =~ /^join\s+(\S+)$/; + if ($channel) { + $irc->yield(join => $channel); + } else { + $irc->yield(privmsg => $nick => "Syntax: join <channel>"); + } + } if ($what =~ /^say\s/) { my ($channel, $message) = $what =~ /^say\s+(\S+)\s(.*)$/; if ($channel and $message) { |