]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanprotect.cpp
SVSNICK should not translate nicks to UIDs
[user/henk/code/inspircd.git] / src / modules / m_chanprotect.cpp
index 62e41416bac806ca5caae0ab4604a124009d83cd..caef4961f2dec09a33735aa0fbe9b078af9a4b80 100644 (file)
@@ -162,7 +162,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
 {
  public:
        ChanProtect(Module* Creator)
-               : ModeHandler(Creator, "protected", 'a', PARAM_ALWAYS, MODETYPE_CHANNEL),
+               : ModeHandler(Creator, "admin", 'a', PARAM_ALWAYS, MODETYPE_CHANNEL),
                  FounderProtectBase('a',"protected user", 388, 389)
        {
                ModeHandler::list = true;
@@ -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);
                }