From cd5ea1cf2cf3db2c16c919e486bc21b96986eabf Mon Sep 17 00:00:00 2001 From: dms Date: Sun, 22 Apr 2001 14:01:21 +0000 Subject: [PATCH] make sure chanstats don't flood 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 | 7 +++++++ src/logger.pl | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/UserExtra.pl b/src/UserExtra.pl index 9923a09..c09291e 100644 --- a/src/UserExtra.pl +++ b/src/UserExtra.pl @@ -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) { diff --git a/src/logger.pl b/src/logger.pl index ad72e08..25a4deb 100644 --- a/src/logger.pl +++ b/src/logger.pl @@ -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; -- 2.39.2