diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-10 20:04:39 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-10 20:04:39 +0000 |
commit | c68005649fcf206baab17d27e8b68aa59b9a3e38 (patch) | |
tree | f33b2d8a7c497e536fd13689eb4721a2813aea77 | |
parent | b9ec32f3e1f927bcc9d7264408cbe8084d774474 (diff) |
Fix crashes found by owine (usually on startup)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8559 e03df62e-2008-0410-955e-edbf42e46eb7
-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)) { |