From 67878d628c15f2adec41b6d3b266830a636c2ed0 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 28 Dec 2006 16:55:50 +0000 Subject: 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 --- src/modules/m_noinvite.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules/m_noinvite.cpp') diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp index 64b4ecc5f..0b4e1723b 100644 --- a/src/modules/m_noinvite.cpp +++ b/src/modules/m_noinvite.cpp @@ -54,7 +54,8 @@ class ModuleNoInvite : public Module ModuleNoInvite(InspIRCd* Me) : Module::Module(Me) { ni = new NoInvite(ServerInstance); - ServerInstance->AddMode(ni, 'V'); + if (!ServerInstance->AddMode(ni, 'V')) + throw ModuleException("Could not add new modes!"); } void Implements(char* List) -- cgit v1.2.3