|
|||
|
|||
|
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_unloadmodule.h" 00017 00018 00019 00020 extern "C" DllExport command_t* init_command(InspIRCd* Instance) 00021 { 00022 return new cmd_unloadmodule(Instance); 00023 } 00024 00025 CmdResult cmd_unloadmodule::Handle (const char** parameters, int pcnt, userrec *user) 00026 { 00027 if (ServerInstance->UnloadModule(parameters[0])) 00028 { 00029 ServerInstance->WriteOpers("*** MODULE UNLOADED: %s unloaded %s", user->nick, parameters[0]); 00030 user->WriteServ("973 %s %s :Module successfully unloaded.",user->nick, parameters[0]); 00031 } 00032 else 00033 { 00034 user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError()); 00035 return CMD_FAILURE; 00036 } 00037 00038 return CMD_SUCCESS; 00039 }