* 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_t(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)
- virtual CmdResult HandleServer(const char** parameters, int pcnt, const std::string &servername)
+ virtual CmdResult HandleServer(const char* const* /* parameters */, int /* pcnt */, const std::string& /* servername */)
#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);