X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_loadmodule.cpp;h=2462cf463ea1a32d3a023437d8efc701e4c2cc29;hb=aec772bdc98bdcfe35c2fc8e74942403c9efcc4d;hp=2f1dc75d32f97b8133c0b43829de6caf0de77492;hpb=1b7c615062a7b203c7fc3ce4c56e16eb671f7c15;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_loadmodule.cpp b/src/cmd_loadmodule.cpp index 2f1dc75d3..2462cf463 100644 --- a/src/cmd_loadmodule.cpp +++ b/src/cmd_loadmodule.cpp @@ -2,12 +2,9 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * + * 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. * @@ -18,22 +15,25 @@ #include "users.h" #include "commands/cmd_loadmodule.h" - - extern "C" 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; } } +