From b022dbd4a3de95a209c649fc355dc46d33770c6e Mon Sep 17 00:00:00 2001 From: dms Date: Fri, 11 Aug 2000 12:48:56 +0000 Subject: [PATCH] closed 17091 -- chaninfo stats inconsistent after time git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@32 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/IRC/Schedulers.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/blootbot/src/IRC/Schedulers.pl b/blootbot/src/IRC/Schedulers.pl index efb28af..fff610e 100644 --- a/blootbot/src/IRC/Schedulers.pl +++ b/blootbot/src/IRC/Schedulers.pl @@ -249,6 +249,20 @@ sub netsplitCheck { } } + # %netsplit hash checker. + foreach (keys %netsplit) { + if (&IsNickInAnyChan($_)) { + &DEBUG("netsplitC: $_ is in some chan; removing from netsplit list."); + delete $netsplit{$_}; + } + next unless (time() - $netsplit{$_} > 60*60*2); # 2 hours. + + if (!&IsNickInAnyChan($_)) { + &DEBUG("netsplitC: $_ didn't come back from netsplit in 2 hours; removing from netsplit list."); + delete $netsplit{$_}; + } + } + &ScheduleThis(30, "netsplitCheck") if (@_); } -- 2.39.5