]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/botmail.pl
agreed
[infobot.git] / src / Modules / botmail.pl
index 690d49e36c61c23aa6d1018a127ec1721cdbabcf..c0ecab5e49e1b960bc6b9e60684ec45e0c168d53 100644 (file)
@@ -27,6 +27,9 @@ sub parse {
     if ($what =~ /^(for|add)\s+(.*)$/i) {
        &add( split(/\s+/, $2, 2) );
 
+    } elsif ($what =~ /^stats?$/i) {
+       &stats();
+
     } elsif ($what =~ /^check?$/i) {
        &check( $1, 1);
 
@@ -37,6 +40,11 @@ sub parse {
     }
 }
 
+sub stats {
+    my $botmail        = &::countKeys("botmail");
+    &::msg($::who, "I have \002$botmail\002 ". &::fixPlural("message", $botmail). ".");
+}
+
 #####
 # Usage: botmail::check($recipient, [$always])
 sub check {