From: Attila Molnar Date: Wed, 26 Mar 2014 16:24:51 +0000 (+0100) Subject: m_globalload Don't pass a callback to ModuleManager::Reload() if reloading m_globalload X-Git-Tag: v2.0.23~195 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=730128891aa71e2fec2f6210f2ebf339e233cd01;p=user%2Fhenk%2Fcode%2Finspircd.git m_globalload Don't pass a callback to ModuleManager::Reload() if reloading m_globalload --- 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());