]> git.donarmstrong.com Git - infobot.git/commitdiff
agreed
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 23 Nov 2002 20:03:30 +0000 (20:03 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 23 Nov 2002 20:03:30 +0000 (20:03 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@696 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/botmail.pl
src/UserExtra.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 {
index bfd2487c2c6bbda1cb2aaec2f8e623f9f337fae6..d468fff6eb3e7501c31fbe6cf98bb9f069062b7d 100644 (file)
@@ -793,7 +793,6 @@ sub userCommands {
        my $startString = scalar(gmtime $^T);
        my $upString    = &Time2String(time() - $^T);
        my $factoids    = &countKeys("factoids");
-       my $botmail     = &countKeys("botmail");
 
        $count{'Commands'}      = 0;
        foreach (keys %cmdstats) {
@@ -814,7 +813,6 @@ sub userCommands {
                &fixPlural("command",$count{'Commands'}).
          ".  I have been awake for $upString this session, and ".
          "currently reference \002$factoids\002 factoids.  ".
-         "I have \002$botmail\002 ". &fixPlural("message", $botmail). ".  ".
          "I'm using about \002$memusage\002 ".
          "kB of memory."
        );