From 051749fa68a78e5a6e808f2a7d151788c75f9373 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 24 Feb 2010 18:49:21 +0000 Subject: [PATCH] Fix empty prefixes in m_chanprotect git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12558 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_chanprotect.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 872ff8d7c..caef4961f 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -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); } -- 2.39.2