diff options
| author | 2006-12-28 16:55:50 +0000 | |
|---|---|---|
| committer | 2006-12-28 16:55:50 +0000 | |
| commit | 67878d628c15f2adec41b6d3b266830a636c2ed0 (patch) | |
| tree | bf981b6f291ff9c276a2020a673281c05b4f75ba /src/modules/m_services_account.cpp | |
| parent | Add support for LOCKSERV/UNLOCKSERV to block/open for new connections. Thanks... (diff) | |
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_services_account.cpp')
| -rw-r--r-- | src/modules/m_services_account.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 47845054c..b5024e4df 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -122,9 +122,8 @@ class ModuleServicesAccount : public Module m1 = new AChannel_R(ServerInstance); m2 = new AChannel_M(ServerInstance); m3 = new AUser_R(ServerInstance); - ServerInstance->AddMode(m1, 'R'); - ServerInstance->AddMode(m2, 'M'); - ServerInstance->AddMode(m3, 'R'); + if (!ServerInstance->AddMode(m1, 'R') || !ServerInstance->AddMode(m2, 'M') || !ServerInstance->AddMode(m3, 'R')) + throw ModuleException("Could not add new modes!"); } /* <- :twisted.oscnet.org 330 w00t2 w00t2 w00t :is logged in as */ |
