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


Public Member Functions | |
| cmd_join (InspIRCd *Instance) | |
| Constructor for join. | |
| 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_join.h.
|
|
Constructor for join.
Definition at line 32 of file cmd_join.h. References command_t::syntax.
|
|
||||||||||||||||
|
Handle command.
Implements command_t. Definition at line 25 of file cmd_join.cpp. References CMD_FAILURE, CMD_SUCCESS, InspIRCd::IsChannel(), chanrec::JoinUser(), CommandParser::LoopCall(), userrec::nick, InspIRCd::Parser, command_t::ServerInstance, and userrec::WriteServ(). 00026 { 00027 if (pcnt > 1) 00028 { 00029 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0, 1)) 00030 return CMD_SUCCESS; 00031 00032 if (ServerInstance->IsChannel(parameters[0])) 00033 { 00034 chanrec::JoinUser(ServerInstance, user, parameters[0], false, parameters[1]); 00035 return CMD_SUCCESS; 00036 } 00037 } 00038 else 00039 { 00040 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0)) 00041 return CMD_SUCCESS; 00042 00043 if (ServerInstance->IsChannel(parameters[0])) 00044 { 00045 chanrec::JoinUser(ServerInstance, user, parameters[0], false, ""); 00046 return CMD_SUCCESS; 00047 } 00048 } 00049 00050 user->WriteServ("403 %s %s :Invalid channel name",user->nick, parameters[0]); 00051 return CMD_FAILURE; 00052 }
|