|
|||
|
|||
|
Inheritance diagram for cmd_gunloadmodule:


Public Member Functions | |
| cmd_gunloadmodule (InspIRCd *Instance) | |
| CmdResult | Handle (const char **parameters, int pcnt, userrec *user) |
| Handle the command from a user. | |
Definition at line 57 of file m_globalload.cpp.
|
|
Definition at line 60 of file m_globalload.cpp. References command_t::source, and command_t::syntax. 00060 : command_t(Instance,"GUNLOADMODULE", 'o', 1) 00061 { 00062 this->source = "m_globalload.so"; 00063 syntax = "<modulename> [servermask]"; 00064 }
|
|
||||||||||||||||
|
Handle the command from a user.
Implements command_t. Definition at line 66 of file m_globalload.cpp. References CMD_SUCCESS, InspIRCd::Config, InspIRCd::MatchText(), InspIRCd::ModuleError(), userrec::nick, command_t::ServerInstance, ServerConfig::ServerName, InspIRCd::UnloadModule(), InspIRCd::WriteOpers(), and userrec::WriteServ(). 00067 { 00068 std::string servername = pcnt > 1 ? parameters[1] : "*"; 00069 00070 if (ServerInstance->MatchText(ServerInstance->Config->ServerName, servername)) 00071 { 00072 if (ServerInstance->UnloadModule(parameters[0])) 00073 { 00074 ServerInstance->WriteOpers("*** MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0],user->nick); 00075 user->WriteServ("973 %s %s :Module successfully unloaded.",user->nick, parameters[0]); 00076 } 00077 else 00078 { 00079 user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError()); 00080 } 00081 } 00082 else 00083 ServerInstance->WriteOpers("*** MODULE '%s' GLOBAL UNLOAD BY '%s' (not unloaded here)",parameters[0],user->nick); 00084 00085 return CMD_SUCCESS; 00086 }
|