X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FIRC%2FIrcHelpers.pl;h=2518772fd6339b939579a827a952af5c188d61b0;hb=b511ebc2771410931f47d333c63204fde727f575;hp=893011f2af1d1931be73b1fbb1e4a4b0f9311561;hpb=d9f3b8d511846260afd826fb6e97ec466f12cbc2;p=infobot.git diff --git a/src/IRC/IrcHelpers.pl b/src/IRC/IrcHelpers.pl index 893011f..2518772 100644 --- a/src/IRC/IrcHelpers.pl +++ b/src/IRC/IrcHelpers.pl @@ -6,8 +6,6 @@ # 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 ######## ####################################################################### @@ -196,10 +194,12 @@ sub hookMsg { 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; } @@ -221,8 +221,8 @@ sub hookMsg { } push(@ignore, keys %{ $ignore{"*"} }) if (exists $ignore{"*"}); - if ((!$skipmessage or &IsChanConf("seenStoreAll")) and - &IsChanConf("seen") and + if ((!$skipmessage or &IsChanConf("seenStoreAll") > 0) and + &IsChanConf("seen") > 0 and $msgType =~ /public/ ) { $seencache{$who}{'time'} = time(); @@ -290,7 +290,7 @@ sub chanLimitVerify { } if (!defined $l) { - &DEBUG("running chanlimitCheck from chanLimitVerify; FIXME! (chan = $chan)"); + &DEBUG("$chan: running chanlimitCheck from chanLimitVerify."); &chanlimitCheck(); return; } @@ -344,10 +344,10 @@ sub chanServCheck { &VERB("chanServCheck($chan) called.",2); if ( &IsParam("nickServ_pass") and !$nickserv) { - &DEBUG("chanServ_ops($chan): nickserv enabled but not alive? (ircCheck)"); $conn->who("NickServ"); return 0; } + # check for first hash then for next hash. # todo: a function for &ischanop()? &isvoice()? if (exists $channels{$chan} and exists $channels{$chan}{'o'}{$ident}) {