From 1ef1977b8066dc90d6978ede65e584d13693d142 Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 16 Feb 2010 01:07:57 +0000 Subject: Handle GRELOADMODULE when module is not loaded git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12472 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_globalload.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/modules') 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()); -- cgit v1.2.3