]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_channel/core_channel.cpp
Don't allow users to set a zero channel limit.
[user/henk/code/inspircd.git] / src / coremods / core_channel / core_channel.cpp
index af71e2ced19792e098f171cbb998508e9b868513..161f618d1359379f52831b0646c9023081e5ff52 100644 (file)
@@ -104,6 +104,11 @@ class CoreModChannel : public Module, public CheckExemption::EventListener
                        exempts[restriction] = prefix;
                }
                exemptions.swap(exempts);
+
+               // In 2.0 we allowed limits of 0 to be set. This is non-standard behaviour
+               // and will be removed in the next major release.
+               limitmode.minlimit = optionstag->getBool("allowzerolimit", true) ? 0 : 1;
+
                banmode.DoRehash();
        }