diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-04 19:12:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-04 19:12:03 +0000 |
commit | d3d06093ddee93f5b3c2101fc70796b4def45109 (patch) | |
tree | 1383ba0eef855cd30bd2d2b33ef2d047db3a6d72 /src/modules/m_chanprotect.cpp | |
parent | 28dea7fd09112224a79dfe6b141497ed46b44988 (diff) |
Better checks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9331 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r-- | src/modules/m_chanprotect.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 768c7eb8c..583bde692 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -300,8 +300,8 @@ class ModuleChanProtect : public Module public: ModuleChanProtect(InspIRCd* Me) - : Module(Me), FirstInGetsFounder(false), QPrefix(0), APrefix(0), DeprivSelf(false), DeprivOthers(false), booting(true) - { + : Module(Me), FirstInGetsFounder(false), QPrefix(0), APrefix(0), DeprivSelf(false), DeprivOthers(false), booting(true), cp(NULL), cf(NULL) + { /* Load config stuff */ OnRehash(NULL,""); booting = false; @@ -359,6 +359,12 @@ class ModuleChanProtect : public Module if ((APrefix && QPrefix) && APrefix == QPrefix) throw CoreException("What the smeg, why are both your +q and +a prefixes the same character?"); + if (cp && ServerInstance->Modes->FindPrefix(APrefix) == cp) + throw CoreException("Looks like the +a prefix you picked for m_chanprotect is already in use. Pick another."); + + if (cf && ServerInstance->Modes->FindPrefix(APrefix) == cf) + throw CoreException("Looks like the +q prefix you picked for m_chanprotect is already in use. Pick another."); + DeprivSelf = Conf.ReadFlag("options","deprotectself",0); DeprivOthers = Conf.ReadFlag("options","deprotectothers",0); |