* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
/** Used to indicate command success codes
*/
enum CmdResult
{
CMD_FAILURE = 0, /* Command exists, but failed */
CMD_SUCCESS = 1, /* Command exists, and succeeded */
/** Used to indicate command success codes
*/
enum CmdResult
{
CMD_FAILURE = 0, /* Command exists, but failed */
CMD_SUCCESS = 1, /* Command exists, and succeeded */
/** 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) : ServerInstance(Instance), command(cmd), flags_needed(flags), min_params(minpara), disabled(false), works_before_reg(before_reg)
+ 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.
*/