summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-10 20:04:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-10 20:04:39 +0000
commitc68005649fcf206baab17d27e8b68aa59b9a3e38 (patch)
treef33b2d8a7c497e536fd13689eb4721a2813aea77 /src/modules
parentb9ec32f3e1f927bcc9d7264408cbe8084d774474 (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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_cloaking.cpp12
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))
{