# NOTE: Based on code by Kevin Lenzo & Patrick Cole (c) 1997
#
-if (&IsParam("useStrict")) { use strict; }
-
#######################################################################
####### IRC HOOK HELPERS IRC HOOK HELPERS IRC HOOK HELPERS ########
#######################################################################
my $i = scalar keys %{ $flood{$floodwho} };
if ($i > $count) {
- &msg($who,"overflow of messages ($i > $count)");
+ my $expire = $param{'ignoreAutoExpire'} || 5;
+
+# &msg($who,"overflow of messages ($i > $count)");
+ &msg($who,"Too many queries from you, ignoring for $expire minutes.");
&status("FLOOD overflow detected from $floodwho; ignoring");
- my $expire = $param{'ignoreAutoExpire'} || 5;
&ignoreAdd("*!$uh", $chan, $expire, "flood overflow auto-detected.");
return;
}
# better to ignore an extra message than to allow one to get
# through, although it would be better to go through ignore
# checking again.
- if (time() - $cache{ignoreCheckTime} > 60) {
+ if (time() - ($cache{ignoreCheckTime} || 0) > 60) {
&ignoreCheck();
}
# &DEBUG("IrcHooks: process returned '$_'.");
}
+ # hack to remove +o from ppl with +O flag.
+ if (exists $users{$userHandle} && exists $users{$userHandle}{FLAGS} &&
+ $users{$userHandle}{FLAGS} =~ /O/
+ ) {
+ $users{$userHandle}{FLAGS} =~ s/o//g;
+ }
+
return;
}
}
if (!defined $l) {
- &DEBUG("running chanlimitCheck from chanLimitVerify; FIXME! (chan = $chan)");
+ &DEBUG("$chan: running chanlimitCheck from chanLimitVerify.");
&chanlimitCheck();
return;
}
&status("clc: big change in limit for $chan ($delta);".
"going for it. (was: $l; now: ".($count+$plus).")");
- &rawout("MODE $chan +l ".($count+$plus) );
+ $conn->mode($chan, "+l", $count+$plus);
$cache{chanlimitChange}{$chan} = time();
}
if ( &IsParam("nickServ_pass") and !$nickserv) {
&DEBUG("chanServ_ops($chan): nickserv enabled but not alive? (ircCheck)");
- &rawout("WHO NickServ");
+ $conn->who("NickServ");
return 0;
}
# check for first hash then for next hash.