# Created: 20000107
#
-if (&IsParam("useStrict")) { use strict; }
-
+#use strict;
use vars qw($message $arg $qWord $verb $lobotomized);
use vars qw(%channels %chanstats %cmdstats);
}
# 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";
}
sub ispell {
my $query = shift;
- if (! -x "/usr/bin/spell") {
+ if (! -x "/usr/bin/ispell") {
&msg($who, "no binary found.");
return;
}
} 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.");
if ($param{'ircNick'} eq $ident) {
&msg($who, "I hope you're right. I'll try anyway.");
}
+ &DEBUG("ircNick => $param{'ircNick'}");
+ &DEBUG("ident => $ident");
if (! &IsNickInAnyChan( $param{ircNick} ) ) {
my $str = "attempting to change nick to $param{'ircNick'}";
&msg($who, $str);
&nick($param{'ircNick'});
} else {
- &msg($who, "hrm... can't do it");
+ &msg($who, "hrm.. I shouldn't do it (BUG?) but doing it anyway!");
&DEBUG("wN: nick is somewhere... should try later.");
+ &nick($param{'ircNick'});
}
return;