|
| ~Command () CXX11_OVERRIDE |
|
virtual CmdResult | Handle (User *user, const Params ¶meters)=0 |
|
void | RegisterService () CXX11_OVERRIDE |
|
virtual void | TellNotEnoughParameters (LocalUser *user, const Params ¶meters) |
|
virtual void | TellNotRegistered (LocalUser *user, const Params ¶meters) |
|
Public Member Functions inherited from CommandBase |
| CommandBase (Module *me, const std::string &cmd, unsigned int minpara=0, unsigned int maxpara=0) |
|
virtual RouteDescriptor | GetRouting (User *user, const CommandBase::Params ¶meters) |
|
virtual void | EncodeParameter (std::string ¶meter, unsigned int index) |
|
| ServiceProvider (Module *Creator, const std::string &Name, ServiceType Type) |
|
void | DisableAutoRegister () |
|
virtual CullResult | cull () |
|
|
| Command (Module *me, const std::string &cmd, unsigned int minpara=0, unsigned int maxpara=0) |
|
◆ Command()
Command::Command |
( |
Module * |
me, |
|
|
const std::string & |
cmd, |
|
|
unsigned int |
minpara = 0 , |
|
|
unsigned int |
maxpara = 0 |
|
) |
| |
|
protected |
Initializes a new instance of the Command class.
- Parameters
-
me | The module which created this instance. |
cmd | The name of the command. |
minpara | The minimum number of parameters that the command accepts. |
maxpara | The maximum number of parameters that the command accepts. |
◆ ~Command()
Unregisters this command from the command parser.
◆ Handle()
virtual CmdResult Command::Handle |
( |
User * |
user, |
|
|
const Params & |
parameters |
|
) |
| |
|
pure virtual |
Handle the command from a user.
- Parameters
-
user | The user who issued the command. |
parameters | The parameters for the command. |
- Returns
- Returns CMD_FAILURE on failure, CMD_SUCCESS on success, or CMD_INVALID if the command was malformed.
Implemented in SplitCommand.
◆ RegisterService()
void Command::RegisterService |
( |
| ) |
|
|
virtual |
Registers this command with the command parser.
Reimplemented from ServiceProvider.
◆ TellNotEnoughParameters()
void Command::TellNotEnoughParameters |
( |
LocalUser * |
user, |
|
|
const Params & |
parameters |
|
) |
| |
|
virtual |
Tells the user they did not specify enough parameters.
- Parameters
-
user | The user who issued the command. |
parameters | The parameters for the command. |
◆ TellNotRegistered()
void Command::TellNotRegistered |
( |
LocalUser * |
user, |
|
|
const Params & |
parameters |
|
) |
| |
|
virtual |
Tells the user they need to be registered to execute this command.
- Parameters
-
user | The user who issued the command. |
parameters | The parameters for the command. |
◆ flags_needed
unsigned char Command::flags_needed |
The user modes required to be able to execute this command.
◆ force_manual_route
bool Command::force_manual_route |
Whether the command will not be forwarded by the linking module even if it comes via ENCAP.
◆ Penalty
unsigned int Command::Penalty |
The number of seconds worth of penalty that executing this command gives.
◆ syntax
std::string Command::syntax |
If non-empty then the syntax of the parameter for this command.
◆ use_count
unsigned long Command::use_count |
The number of times this command has been executed.
◆ works_before_reg
bool Command::works_before_reg |
Whether the command can be issued before registering.
The documentation for this class was generated from the following files: