InspIRCd  3.0
Public Member Functions | Public Attributes | List of all members
Command Class Referenceabstract
Inheritance diagram for Command:
CommandBase ServiceProvider classbase CommandWhowas SplitCommand

Public Member Functions

 Command (Module *me, const std::string &cmd, unsigned int minpara=0, unsigned int maxpara=0)
virtual CmdResult Handle (User *user, const Params &parameters)=0
void RegisterService () CXX11_OVERRIDE
 ~Command ()
- 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 &parameters)
virtual void EncodeParameter (std::string &parameter, unsigned int index)
bool WorksBeforeReg ()
- Public Member Functions inherited from ServiceProvider
 ServiceProvider (Module *Creator, const std::string &Name, ServiceType Type)
void DisableAutoRegister ()
- Public Member Functions inherited from classbase
virtual CullResult cull ()

Public Attributes

bool force_manual_route
- Public Attributes inherited from CommandBase
unsigned char flags_needed
const unsigned int min_params
const unsigned int max_params
unsigned long use_count
bool works_before_reg
bool allow_empty_last_param
std::string syntax
std::vector< TranslateType > translation
unsigned int Penalty
- Public Attributes inherited from ServiceProvider
ModuleRef creator
const std::string name
const ServiceType service

Constructor & Destructor Documentation

◆ ~Command()

Command::~Command ( )

Destructor Removes this command from the command parser

Member Function Documentation

◆ Handle()

virtual CmdResult Command::Handle ( User user,
const Params parameters 
pure virtual

Handle the command from a user.

parametersThe parameters for the command.
userThe user who issued the command.
Return CMD_SUCCESS on success, or CMD_FAILURE on failure.

Implemented in SplitCommand, and CommandWhowas.

◆ RegisterService()

void Command::RegisterService ( )

Register this object in the CommandParser

Reimplemented from ServiceProvider.

Member Data Documentation

◆ force_manual_route

bool Command::force_manual_route

If true, the command will not be forwarded by the linking module even if it comes via ENCAP. Can be used to forward commands before their effects.

The documentation for this class was generated from the following files: