aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsaxrobot24
1 files changed, 24 insertions, 0 deletions
diff --git a/saxrobot b/saxrobot
index a90eb3c..05a4315 100755
--- a/saxrobot
+++ b/saxrobot
@@ -93,6 +93,30 @@ sub irc_msg {
$irc->yield(privmsg => $nick => "I am bot, go away");
return;
}
+ if ($what =~ /^nick\s/) {
+ my ($channel) = $what =~ /^nick\s+(\S+)$/;
+ if ($channel) {
+ $irc->yield(nick => $channel);
+ } else {
+ $irc->yield(privmsg => $nick => "Syntax: nick <nick>");
+ }
+ }
+ 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) {