diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-03-26 17:24:51 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-03-26 17:24:51 +0100 |
commit | 730128891aa71e2fec2f6210f2ebf339e233cd01 (patch) | |
tree | 9d42405d68b4f65f31ccb4982c53efeb03561cd2 /src/modules | |
parent | ff33ebe7d9d9fb835d6c66ff15ddef78462966d0 (diff) |
m_globalload Don't pass a callback to ModuleManager::Reload() if reloading m_globalload
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_globalload.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 22286b950..9e0ec7705 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -149,7 +149,12 @@ class CommandGreloadmodule : public Command { Module* m = ServerInstance->Modules->Find(parameters[0]); if (m) - ServerInstance->Modules->Reload(m, new GReloadModuleWorker(user->nick, user->uuid, parameters[0])); + { + GReloadModuleWorker* worker = NULL; + if (m != creator) + worker = new GReloadModuleWorker(user->nick, user->uuid, parameters[0]); + ServerInstance->Modules->Reload(m, worker); + } else { user->WriteNumeric(975, "%s %s :Could not find module by that name", user->nick.c_str(), parameters[0].c_str()); |