diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_cloaking.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index e1b8db61f..43a0f5693 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -322,8 +322,6 @@ class ModuleCloaking : public Module /* Create new mode handler object */ cu = new CloakUser(ServerInstance, this, HashModule); - OnRehash(NULL,""); - /* Attempt to locate the md5 service provider, bail if we can't find it */ HashModule = ServerInstance->Modules->Find("m_md5.so"); if (!HashModule) @@ -332,6 +330,16 @@ class ModuleCloaking : public Module throw ModuleException("Can't find m_md5.so. Please load m_md5.so before m_cloaking.so."); } + try + { + OnRehash(NULL,""); + } + catch (CoreException &e) + { + delete cu; + throw e; + } + /* Register it with the core */ if (!ServerInstance->AddMode(cu)) { |