/** Create a new command.
* @param Instance Pointer to creator class
* @param cmd Command name. This must be UPPER CASE.
/** Create a new command.
* @param Instance Pointer to creator class
* @param cmd Command name. This must be UPPER CASE.
* For oper only commands, set this to 'o', otherwise use 0.
* @param minpara Minimum parameters required for the command.
* @param before_reg If this is set to true, the command will
* be allowed before the user is 'registered' (has sent USER,
* NICK, optionally PASS, and been resolved).
*/
* For oper only commands, set this to 'o', otherwise use 0.
* @param minpara Minimum parameters required for the command.
* @param before_reg If this is set to true, the command will
* be allowed before the user is 'registered' (has sent USER,
* NICK, optionally PASS, and been resolved).
*/
- Command(InspIRCd* Instance, const std::string &cmd, char flags, int minpara, int before_reg = false, int penalty = 1) : ServerInstance(Instance), command(cmd), flags_needed(flags), min_params(minpara), disabled(false), works_before_reg(before_reg), Penalty(penalty)
+ Command(InspIRCd* Instance, const std::string &cmd, const char *flags, int minpara, int before_reg = false, int penalty = 1) : ServerInstance(Instance), command(cmd), flags_needed(flags ? *flags : 0), min_params(minpara), disabled(false), works_before_reg(before_reg), Penalty(penalty)
* @param user The user who issued the command.
* @return Return CMD_SUCCESS on success, or CMD_FAILURE on failure.
* If the command succeeds but should remain local to this server,
* return CMD_LOCALONLY.
*/
* @param user The user who issued the command.
* @return Return CMD_SUCCESS on success, or CMD_FAILURE on failure.
* If the command succeeds but should remain local to this server,
* return CMD_LOCALONLY.
*/
/** Handle the command from a server.
* Not currently used in this version of InspIRCd.
* @param parameters The parameters given
/** Handle the command from a server.
* Not currently used in this version of InspIRCd.
* @param parameters The parameters given
* @param servername The server name which issued the command
* @return Return CMD_SUCCESS on success, or CMD_FAILURE on failure.
* If the command succeeds but should remain local to this server,
* return CMD_LOCALONLY.
*/
* @param servername The server name which issued the command
* @return Return CMD_SUCCESS on success, or CMD_FAILURE on failure.
* If the command succeeds but should remain local to this server,
* return CMD_LOCALONLY.
*/
#define TRANSLATE1(x1) translation.push_back(x1);
#define TRANSLATE2(x1,x2) translation.push_back(x1);translation.push_back(x2);
#define TRANSLATE1(x1) translation.push_back(x1);
#define TRANSLATE2(x1,x2) translation.push_back(x1);translation.push_back(x2);