diff options
-rw-r--r-- | src/modules/m_globalload.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index db081057a..be29b00a5 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -113,7 +113,13 @@ class CommandGreloadmodule : public Command if (InspIRCd::Match(ServerInstance->Config->ServerName.c_str(), servername)) { Module* m = ServerInstance->Modules->Find(parameters[0]); - ServerInstance->Modules->Reload(m, NULL); + if (m) + ServerInstance->Modules->Reload(m, NULL); + else + { + user->WriteNumeric(975, "%s %s :Could not find module by that name", user->nick.c_str(), parameters[0].c_str()); + return CMD_FAILURE; + } } else ServerInstance->SNO->WriteToSnoMask('a', "MODULE '%s' GLOBAL RELOAD BY '%s' (not reloaded here)",parameters[0].c_str(), user->nick.c_str()); |