From f9c73bf1b36a9f6f31949828b7317af085fa17af Mon Sep 17 00:00:00 2001 From: timriker Date: Thu, 21 Nov 2002 21:29:58 +0000 Subject: [PATCH] botmail check working now git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@671 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Modules/botmail.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/blootbot/src/Modules/botmail.pl b/blootbot/src/Modules/botmail.pl index b348695..95acc7e 100644 --- a/blootbot/src/Modules/botmail.pl +++ b/blootbot/src/Modules/botmail.pl @@ -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", -- 2.39.5