]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_unloadmodule.cpp
Change to use std::string::iterator rather than making a copy of the pointer and...
[user/henk/code/inspircd.git] / src / cmd_unloadmodule.cpp
index 1bb99014b68cda35a06387676c6716ef2c18d2c9..715ff4fcbbc80d5128cb3237aff8255efd60bc1c 100644 (file)
@@ -2,12 +2,9 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *                <Craig@chatspike.net>
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
  *
- * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
@@ -25,15 +22,18 @@ extern "C" command_t* init_command(InspIRCd* Instance)
        return new cmd_unloadmodule(Instance);
 }
 
-void cmd_unloadmodule::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_unloadmodule::Handle (const char** parameters, int pcnt, userrec *user)
 {
        if (ServerInstance->UnloadModule(parameters[0]))
        {
-               ServerInstance->WriteOpers("*** MODULE UNLOADED: %s",parameters[0]);
+               ServerInstance->WriteOpers("*** MODULE UNLOADED: %s unloaded %s", user->nick, parameters[0]);
                user->WriteServ("973 %s %s :Module successfully unloaded.",user->nick, parameters[0]);
        }
        else
        {
                user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
+               return CMD_FAILURE;
        }
+
+       return CMD_SUCCESS;
 }