]> git.donarmstrong.com Git - infobot.git/commitdiff
errors from Schedulers (chanlimitcheck) are cached and shown only once.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 13 Feb 2001 14:01:07 +0000 (14:01 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 13 Feb 2001 14:01:07 +0000 (14:01 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@383 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Schedulers.pl

index b770f25d0484fed300bb4b281b7954ebd7b0c0df..591535adc1492ecf18904dd741faea5676a1d7e4 100644 (file)
@@ -306,10 +306,12 @@ sub chanlimitCheck {
        next unless (!defined $limit or $limit != $newlimit);
 
        if (!exists $channels{$chan}{'o'}{$ident}) {
-           &ERROR("chanlimitcheck: dont have ops on $chan.");
+           &ERROR("chanlimitcheck: dont have ops on $chan.") unless (exists $cache{warn}{chanlimit}{$chan});
+           $cache{warn}{chanlimit}{$chan} = 1;
            ### TODO: check chanserv?
            next;
        }
+       delete $cache{warn}{chanlimit}{$chan};
 
        if (!defined $limit) {
            &DEBUG("setting limit for first time or from netsplit for $chan");