summaryrefslogtreecommitdiff
path: root/src/modules/m_noinvite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_noinvite.cpp')
-rw-r--r--src/modules/m_noinvite.cpp3
1 files changed, 2 insertions, 1 deletions
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)