]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix empty prefixes in m_chanprotect
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 24 Feb 2010 18:49:21 +0000 (18:49 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 24 Feb 2010 18:49:21 +0000 (18:49 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12558 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_chanprotect.cpp

index 872ff8d7c22b4c99c4e606e93dde60e7bab0ab72..caef4961f2dec09a33735aa0fbe9b078af9a4b80 100644 (file)
@@ -261,14 +261,14 @@ class ModuleChanProtect : public Module
                if ((APrefix && QPrefix) && APrefix == QPrefix)
                        throw ModuleException("What the smeg, why are both your +q and +a prefixes the same character?");
 
-               if (ServerInstance->Modes->FindPrefix(APrefix) && ServerInstance->Modes->FindPrefix(APrefix) != &cp)
-                       throw ModuleException("Looks like the +a prefix you picked for m_chanprotect is already in use. Pick another.");
-
-               if (ServerInstance->Modes->FindPrefix(QPrefix) && ServerInstance->Modes->FindPrefix(QPrefix) != &cf)
-                       throw ModuleException("Looks like the +q prefix you picked for m_chanprotect is already in use. Pick another.");
-
                if (settings.booting)
                {
+                       if (APrefix && ServerInstance->Modes->FindPrefix(APrefix) && ServerInstance->Modes->FindPrefix(APrefix) != &cp)
+                               throw ModuleException("Looks like the +a prefix you picked for m_chanprotect is already in use. Pick another.");
+
+                       if (QPrefix && ServerInstance->Modes->FindPrefix(QPrefix) && ServerInstance->Modes->FindPrefix(QPrefix) != &cf)
+                               throw ModuleException("Looks like the +q prefix you picked for m_chanprotect is already in use. Pick another.");
+
                        cp.setPrefix(APrefix);
                        cf.setPrefix(QPrefix);
                }