]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_globalload.cpp
Prevent setting mode -H if already unset, bug #74
[user/henk/code/inspircd.git] / src / modules / m_globalload.cpp
index 50032919a0dac9bbea03d4b244d2f89e4c9b36f0..be29b00a5db246f2876b19577d847c5119039db9 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -76,7 +76,7 @@ class CommandGunloadmodule : public Command
                        if (m && ServerInstance->Modules->Unload(m))
                        {
                                ServerInstance->SNO->WriteToSnoMask('a', "MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0].c_str(), user->nick.c_str());
-                               ServerInstance->DumpText(user, ":%s 973 %s %s :Module successfully unloaded.",
+                               user->SendText(":%s 973 %s %s :Module successfully unloaded.",
                                        ServerInstance->Config->ServerName.c_str(), user->nick.c_str(), parameters[0].c_str());
                        }
                        else
@@ -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());