]> git.donarmstrong.com Git - infobot.git/commitdiff
* Fix NULL chan being created in %channels
authordjmcgrath <djmcgrath@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 28 Oct 2007 18:37:30 +0000 (18:37 +0000)
committerdjmcgrath <djmcgrath@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 28 Oct 2007 18:37:30 +0000 (18:37 +0000)
* Updated BUGS list

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

BUGS
src/IRC/Schedulers.pl

diff --git a/BUGS b/BUGS
index e7c09440a3fea807c107a8b352ff4576a8fa5e82..dc4baea909cc659a328dde49840715a4198ed857 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -4,7 +4,5 @@ Known bugs that should be dealt with soon as possible:
        * !+topic list gives and incorrect error Failed. "You (#botpark) are not in #botpark, hey?"
        * Bot tries to ask chanserv for OP's on any channel. Should be a chanset setting on a per channel basis
        * News is currently stored in a file rather than the SQL table created for it
-       * bot doesnt seem to keep track of stat counters for "heh :) ...etc". Might be settings though and not a bug
        * !help has size issues. Add's extra lines with only 1 or 2 help commands instead of one maximum size IRC msg
-       * FIXME: !WARN! ircCheck: we have a NULL chan in hash channels? removing!
        * Bot can be flooded offline with a crash if !+factstats help and /msg nick factstats help, are used at the same time
index fbf99bdbae79f96eeb879a23306bd42bc9313075..2e6bc8f877589260222b2b2595218b3e598c114e 100644 (file)
@@ -489,9 +489,10 @@ sub netsplitCheck {
     }
 
     # yet another hack.
-    foreach (keys %channels) {
-       my $i = $cache{maxpeeps}{$chan} || 0;
-       my $j = scalar(keys %{ $channels{$chan} });
+    # FIXED: $ch should be used rather than $chan since it creates NULL channels in the hash
+    foreach my $ch (keys %channels) {
+       my $i = $cache{maxpeeps}{$ch} || 0;
+       my $j = scalar(keys %{ $channels{$ch} });
        next unless ($i > 10 and 0.25*$i > $j);
 
        &DEBUG("netsplit: 0.25*max($i) > current($j); possible netsplit?");