]> git.donarmstrong.com Git - infobot.git/commitdiff
make sure chanstats don't flood
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 22 Apr 2001 14:01:21 +0000 (14:01 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 22 Apr 2001 14:01:21 +0000 (14:01 +0000)
don't throttle if it's a perl warn message

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@461 c11ca15a-4712-0410-83d8-924469b57eb5

src/UserExtra.pl
src/logger.pl

index 9923a092115a3aa652ae4c7d241a1d12bef254fb..c09291ef9a31184d5ac200fe6e25d55abf5c4866 100644 (file)
@@ -148,6 +148,13 @@ sub chaninfo {
 
     # Step 3:
     ### TODO: what's wrong with the following?
+    foreach (keys %userstats) {
+       next if (exists $userstats{$_}{'Count'});
+       delete $userstats{$_};
+       $delete++;
+    }
+    &DEBUG("chanstats: delete: $delete... nowtotal => ".scalar(keys %userstats) );
+
     my %new = map { $userstats{$_}{'Count'} => $_ } keys %userstats;
     my($count) = (sort { $b <=> $a } keys %new)[0];
     if ($count) {
index ad72e08252acc95717a52d8e8d592a0b4912e125..25a4debb7defb10ecfac484e08f681bd10a1282b 100644 (file)
@@ -191,7 +191,7 @@ sub status {
     my $status;
 
     if ($input eq $logold) {
-       $logrepeat++;
+       $logrepeat++ unless (/!WARN! PERL: Use of uninitialized/);
 
        if ($logrepeat >= 3) {
            $logrepeat = 0;