From 9d8d996031392304d030ddc9d569e03660be4915 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 9 Nov 2007 17:03:19 +0000 Subject: Make AddMode the last thing the constructor does. git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@8546 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cloaking.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/modules/m_cloaking.cpp') diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index ad7a7e337..348d45775 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -324,11 +324,10 @@ class ModuleCloaking : public Module /* Create new mode handler object */ cu = new CloakUser(ServerInstance, this, HashModule); - /* Register it with the core */ + OnRehash(NULL,""); + if (!ServerInstance->AddMode(cu, 'x')) throw ModuleException("Could not add new modes!"); - - OnRehash(NULL,""); } virtual ~ModuleCloaking() -- cgit v1.3.1-10-gc9f91