diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-16 01:07:57 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-16 01:07:57 +0000 |
commit | 1ef1977b8066dc90d6978ede65e584d13693d142 (patch) | |
tree | 674a6b7ab9e16114de71aa9630db8c58a71c862f /src | |
parent | 7d1378e153be701768a656d42f0f6fbfe5ac5645 (diff) |
Handle GRELOADMODULE when module is not loaded
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12472 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-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()); |