diff options
author | Sadie Powell <sadie@witchery.services> | 2020-10-27 00:41:36 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-10-27 00:42:32 +0000 |
commit | 7ba36f5348a6cca1c0da820c60ae17063f3cdad5 (patch) | |
tree | 08418d94985ba9214f5077d117c5d585a09fa2fd | |
parent | b271e0700a3fcedba73d540ae2eb27f5d3f67cdf (diff) |
Don't kill cloaking users when hash/md5 is missing.
-rw-r--r-- | include/dynref.h | 2 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/dynref.h b/include/dynref.h index 2569d755c..bcfca9647 100644 --- a/include/dynref.h +++ b/include/dynref.h @@ -59,7 +59,7 @@ class CoreExport dynamic_reference_base : public interfacebase, public insp::int inline void dynamic_reference_base::check() { if (!value) - throw ModuleException("Dynamic reference to '" + name + "' failed to resolve"); + throw ModuleException("Dynamic reference to '" + name + "' failed to resolve. Are you missing a module?"); } template<typename T> diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 83e5f2f09..f3818d623 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -146,8 +146,16 @@ class CloakUser : public ModeHandler if (!cloaks) { /* Force creation of missing cloak */ - creator->OnUserConnect(user); - cloaks = ext.get(user); + try + { + creator->OnUserConnect(user); + cloaks = ext.get(user); + } + catch (CoreException& modexcept) + { + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Exception caught when generating cloak: " + modexcept.GetReason()); + return MODEACTION_DENY; + } } // If we have a cloak then set the hostname. |