]> git.donarmstrong.com Git - infobot.git/commitdiff
botmail check working now
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 21 Nov 2002 21:29:58 +0000 (21:29 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 21 Nov 2002 21:29:58 +0000 (21:29 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@671 c11ca15a-4712-0410-83d8-924469b57eb5

blootbot/src/Modules/botmail.pl

index b34869535f9266c35863a6443fdfa51b8c68029e..95acc7e3656817cecf9030402f5bdbc95210c341 100644 (file)
@@ -19,8 +19,11 @@ sub parse {
        return;
     }
 
-    if ($what =~ /^add\s+(.*)$/i) {
-       &add( split(/\s+/, $1, 2) );
+    if ($what =~ /^(add|for)\s+(.*)$/i) {
+       &add( split(/\s+/, $2, 2) );
+
+    } elsif ($what =~ /^check(\s+(.*))?$/i) {
+       &check( split(/\s+/, $1, 2) );
 
     } elsif ($what =~ /^next$/i) {
        # todo: read specific items? nah, will make this too complex.
@@ -33,6 +36,7 @@ sub parse {
 # Usage: botmail::check($recipient)
 sub check {
     my($recipient) = @_;
+    $recipient ||= $::who;
 
     # todo: simplify this select (use a diff function)
     my @from = &::dbGet("botmail", "srcwho",