]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_loadmodule.cpp
Dunno why this method was static, doesnt need to be...
[user/henk/code/inspircd.git] / src / cmd_loadmodule.cpp
index 9b3a85f1ddc2ede3535e4594b93f13cb4e23c89b..08179d120bab506b2d9dc828270ae058c5fce379 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.
  *
 
 #include "inspircd.h"
 #include "users.h"
-#include "commands.h"
-
 #include "commands/cmd_loadmodule.h"
 
+extern "C" DllExport command_t* init_command(InspIRCd* Instance)
+{
+       return new cmd_loadmodule(Instance);
+}
 
-
-void cmd_loadmodule::Handle (const char** parameters, int pcnt, userrec *user)
+/** Handle /LOADMODULE
+ */
+CmdResult cmd_loadmodule::Handle (const char** parameters, int pcnt, userrec *user)
 {
        if (ServerInstance->LoadModule(parameters[0]))
        {
-               ServerInstance->WriteOpers("*** NEW MODULE: %s",parameters[0]);
+               ServerInstance->WriteOpers("*** NEW MODULE: %s loaded %s",user->nick, parameters[0]);
                user->WriteServ("975 %s %s :Module successfully loaded.",user->nick, parameters[0]);
+               return CMD_SUCCESS;
        }
        else
        {
                user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
+               return CMD_FAILURE;
        }
 }
+