]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/IrcHelpers.pl
prevent erratic (multiple) changes of chan limit in short space of time.
[infobot.git] / src / IRC / IrcHelpers.pl
index 6358aeafa4cbe780211e4d723699a1a2ac93922d..e8d2826b71b752075960a350b5309c681ee47aa7 100644 (file)
@@ -266,6 +266,14 @@ sub chanLimitVerify {
            &WARN("clc: stupid to have plus at $plus, fix it!");
        }
 
+       if (exists $cache{chanlimitChange_$chan}) {
+           if (time() - $cache{chanlimitChange_$chan} < 60) {
+               &DEBUG("not going to change chanlimit!");
+               return;
+           }
+           delete $cache{chanlimitChange_$chan};
+       }
+
        ### todo: check if we have ops.
        ### todo: if not, check if nickserv/chanserv is avail.
        ### todo: unify code with chanlimitcheck()