if ($what =~ /^(for|add)\s+(.*)$/i) {
&add( split(/\s+/, $2, 2) );
+ } elsif ($what =~ /^stats?$/i) {
+ &stats();
+
} elsif ($what =~ /^check?$/i) {
&check( $1, 1);
}
}
+sub stats {
+ my $botmail = &::countKeys("botmail");
+ &::msg($::who, "I have \002$botmail\002 ". &::fixPlural("message", $botmail). ".");
+}
+
#####
# Usage: botmail::check($recipient, [$always])
sub check {
my $startString = scalar(gmtime $^T);
my $upString = &Time2String(time() - $^T);
my $factoids = &countKeys("factoids");
- my $botmail = &countKeys("botmail");
$count{'Commands'} = 0;
foreach (keys %cmdstats) {
&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."
);