}
# todo: show top 3 with percentages?
- my($count) = (sort { $a <=> $b } keys %new)[0];
+ my($count) = (sort { $new{$a} <=> $new{$b} } keys %new)[0];
if ($count) {
$reply .= ". \002$count\002 has said the most with a total of \002$new{$count}\002 messages";
}
} elsif (/^\+/) {
&DEBUG("spell: '+' found => '$_'.");
last;
+ } elsif (/^# (.*?) 0$/) {
+ # none found.
+ last;
} else {
&DEBUG("spell: unknown: '$_'.");
}
my $pid;
$dns =~ s/^\s+|\s+$//g;
+ if (!defined $dns or $dns =~ /^\s*$/ or $dns =~ / /) {
+ &help("dns");
+ return;
+ }
+
if ($dns =~ /(\d+\.\d+\.\d+\.\d+)/) {
$match = $1;
&status("DNS query by IP address: $match");
" ORDER BY counter DESC", 1);
foreach (keys %hash) {
- &DEBUG("cmdstats: hash{$_} => $hash{$_}");
+ my $i = $_;
+ foreach (keys %{ $hash{$i} }) {
+ &DEBUG("cmdstats: $hash{$i}{$_} = $_");
+ }
}
&DEBUG("end of cmdstats.");