]> git.donarmstrong.com Git - infobot.git/commitdiff
add a do <chan> <what> to go with say
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 8 Jul 2004 16:29:13 +0000 (16:29 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 8 Jul 2004 16:29:13 +0000 (16:29 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@989 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/UserDCC.pl

index c813f56ac107bdf4c3955ec9ffd36f9bc0b29780..301581d52e4b0c6da0c7c1ae4fb977a0d11dc33e 100644 (file)
@@ -349,6 +349,23 @@ sub userDCC {
        return;
     }
 
+    # do.
+    if ($message =~ s/^do\s+(\S+)\s+(.*)//) {
+       return unless (&hasFlag("o"));
+       my ($chan,$msg) = (lc $1, $2);
+
+       &DEBUG("chan => '$1', msg => '$msg'.");
+
+       # TODO: add nick destination.
+       if (&validChan($chan)) {
+           &action($chan, $msg);
+       } else {
+           &msg($who,"i'm not on \002$chan\002, sorry.");
+       }
+
+       return;
+    }
+
     # die.
     if ($message =~ /^die$/) {
        return unless (&hasFlag("n"));