aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-12-28 16:55:50 +0000
committerGravatar brain2006-12-28 16:55:50 +0000
commit67878d628c15f2adec41b6d3b266830a636c2ed0 (patch)
treebf981b6f291ff9c276a2020a673281c05b4f75ba /src/modules/m_cloaking.cpp
parentAdd support for LOCKSERV/UNLOCKSERV to block/open for new connections. Thanks... (diff)
downloadinspircd++-67878d628c15f2adec41b6d3b266830a636c2ed0.tar.gz
inspircd++-67878d628c15f2adec41b6d3b266830a636c2ed0.tar.bz2
inspircd++-67878d628c15f2adec41b6d3b266830a636c2ed0.zip
Reasonably sized fix - when adding modes in modules, be sure to check the return value so we dont load two modules with conflicting modes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6137 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r--src/modules/m_cloaking.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index 850a0e5f9..17e8c3405 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -238,7 +238,8 @@ class ModuleCloaking : public Module
cu = new CloakUser(ServerInstance, this, HashModule);
/* Register it with the core */
- ServerInstance->AddMode(cu, 'x');
+ if (!ServerInstance->AddMode(cu, 'x'))
+ throw ModuleException("Could not add new modes!");
OnRehash("");
}