|
|||
|
|||
|
00001 /* +------------------------------------+ 00002 * | Inspire Internet Relay Chat Daemon | 00003 * +------------------------------------+ 00004 * 00005 * InspIRCd: (C) 2002-2008 InspIRCd Development Team 00006 * See: http://www.inspircd.org/wiki/index.php/Credits 00007 * 00008 * This program is free but copyrighted software; see 00009 * the file COPYING for details. 00010 * 00011 * --------------------------------------------------- 00012 */ 00013 00014 #include "inspircd.h" 00015 #include "users.h" 00016 #include "commands/cmd_loadmodule.h" 00017 00018 extern "C" DllExport command_t* init_command(InspIRCd* Instance) 00019 { 00020 return new cmd_loadmodule(Instance); 00021 } 00022 00025 CmdResult cmd_loadmodule::Handle (const char** parameters, int pcnt, userrec *user) 00026 { 00027 if (ServerInstance->LoadModule(parameters[0])) 00028 { 00029 ServerInstance->WriteOpers("*** NEW MODULE: %s loaded %s",user->nick, parameters[0]); 00030 user->WriteServ("975 %s %s :Module successfully loaded.",user->nick, parameters[0]); 00031 return CMD_SUCCESS; 00032 } 00033 else 00034 { 00035 user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError()); 00036 return CMD_FAILURE; 00037 } 00038 } 00039