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 (const std::vector< std::string > &parameters, User *user)=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 std::vector< std::string > &parameters)
 
virtual void EncodeParameter (std::string &parameter, int index)
 
void Disable (bool setting)
 
bool IsDisabled ()
 
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
char flags_needed
 
const unsigned int min_params
 
const unsigned int max_params
 
unsigned long use_count
 
bool disabled
 
bool works_before_reg
 
bool allow_empty_last_param
 
std::string syntax
 
std::vector< TranslateType > translation
 
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 ( const std::vector< std::string > &  parameters,
User user 
)
pure virtual

Handle the command from a user.

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

Implemented in SplitCommand, and CommandWhowas.

◆ RegisterService()

void Command::RegisterService ( )
virtual

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: