]> git.donarmstrong.com Git - infobot.git/commitdiff
closed 17091 -- chaninfo stats inconsistent after time
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 11 Aug 2000 12:48:56 +0000 (12:48 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 11 Aug 2000 12:48:56 +0000 (12:48 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@32 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Schedulers.pl

index efb28afd934f9873de14b194c60be78d43b2059a..fff610ecad2875c3506beae769870203727fe9cd 100644 (file)
@@ -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 (@_);
 }