|
|||
|
|||
|
#include <cmd_quit.h>
Inheritance diagram for cmd_quit:


Public Member Functions | |
| cmd_quit (InspIRCd *Instance) | |
| Constructor for quit. | |
| CmdResult | Handle (const char **parameters, int pcnt, userrec *user) |
| Handle command. | |
These command handlers can be reloaded by the core, and handle basic RFC1459 commands. Commands within modules work the same way, however, they can be fully unloaded, where these may not.
Definition at line 27 of file cmd_quit.h.
|
|
Constructor for quit.
Definition at line 32 of file cmd_quit.h. References command_t::syntax.
|
|
||||||||||||||||
|
Handle command.
Implements command_t. Definition at line 27 of file cmd_quit.cpp. References CMD_SUCCESS, InspIRCd::Config, ServerConfig::FixedQuit, IS_LOCAL, ServerConfig::PrefixQuit, userrec::QuitUser(), command_t::ServerInstance, and ServerConfig::SuffixQuit. 00028 { 00029 00030 std::string quitmsg; 00031 00032 if (IS_LOCAL(user)) 00033 { 00034 if (*ServerInstance->Config->FixedQuit) 00035 quitmsg = ServerInstance->Config->FixedQuit; 00036 else 00037 quitmsg = pcnt ? 00038 ServerInstance->Config->PrefixQuit + std::string(parameters[0]) + ServerInstance->Config->SuffixQuit 00039 : "Client exited"; 00040 } 00041 else 00042 quitmsg = pcnt ? parameters[0] : "Client exited"; 00043 00044 userrec::QuitUser(ServerInstance, user, quitmsg); 00045 00046 return CMD_SUCCESS; 00047 }
|