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 {
if ($t == 0) {
&::msg($recipient, "You have no botmail.") if ($always);
} else {
- &::msg($recipient, "You have $t messages awaiting, from: $from");
+ &::msg($recipient, "You have $t messages awaiting, from: $from (botmail read)");
}
}