my %new;
foreach (keys %userstats) {
next unless (exists $userstats{$_}{'Count'});
+ if ($userstats{$_}{'Count'} =~ /^\D+$/) {
+ &WARN("userstats{$_}{Count} is non-digit.");
+ next;
+ }
+
$new{$_} = $userstats{$_}{'Count'};
}
- my($count) = (sort { $b <=> $a } keys %new)[0];
+ my($count) = (sort { $a <=> $b } keys %new)[0];
if ($count) {
$reply .= ". \002$count\002 has said the most with a total of \002$new{$count}\002 messages";
}
&status("tell: target = $target, query = $query");
# "intrusive".
- if ($target !~ /^$mask{chan}$/ and !&IsNickInAnyChan($target)) {
+# if ($target !~ /^$mask{chan}$/ and !&IsNickInAnyChan($target)) {
+ if ($target !~ /^$mask{chan}$/) {
&msg($who, "No, $target is not in any of my chans.");
return;
}
- ### TODO: don't "tell" if sender is not in target's channel.
-
# self.
if ($target eq $ident) { # lc?
&msg($who, "Isn't that a bit silly?");