InspIRCd  4.0
Public Member Functions | Protected Member Functions | List of all members
SplitCommand Class Reference
Inheritance diagram for SplitCommand:
Command CommandBase ServiceProvider Cullable insp::uncopiable

Public Member Functions

CmdResult Handle (User *user, const Params &parameters) override
 
virtual CmdResult HandleLocal (LocalUser *user, const Params &parameters)
 
virtual CmdResult HandleRemote (RemoteUser *user, const Params &parameters)
 
virtual CmdResult HandleServer (FakeUser *user, const Params &parameters)
 
- Public Member Functions inherited from Command
 ~Command () override
 
void RegisterService () override
 
virtual void TellNotEnoughParameters (LocalUser *user, const Params &parameters)
 
virtual void TellNotRegistered (LocalUser *user, const Params &parameters)
 
- 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)
 
- Public Member Functions inherited from ServiceProvider
 ServiceProvider (Module *Creator, const std::string &Name, ServiceType Type)
 
const char * GetTypeString () const
 
void DisableAutoRegister ()
 
- Public Member Functions inherited from Cullable
virtual ~Cullable ()
 
virtual Result Cull ()
 

Protected Member Functions

 SplitCommand (Module *me, const std::string &cmd, unsigned int minpara=0, unsigned int maxpara=0)
 
- Protected Member Functions inherited from Command
 Command (Module *me, const std::string &cmd, unsigned int minpara=0, unsigned int maxpara=0)
 
- Protected Member Functions inherited from Cullable
 Cullable ()
 

Additional Inherited Members

- Public Attributes inherited from Command
CmdAccess access_needed = CmdAccess::NORMAL
 
bool force_manual_route = false
 
unsigned int Penalty = 1
 
unsigned long use_count = 0
 
std::vector< std::string > syntax
 
bool works_before_reg = false
 
- Public Attributes inherited from CommandBase
const unsigned int min_params
 
const unsigned int max_params
 
bool allow_empty_last_param = true
 
std::vector< TranslateType > translation
 
- Public Attributes inherited from ServiceProvider
ModuleRef creator
 
const std::string name
 
const ServiceType service
 

Constructor & Destructor Documentation

◆ SplitCommand()

SplitCommand::SplitCommand ( Module me,
const std::string &  cmd,
unsigned int  minpara = 0,
unsigned int  maxpara = 0 
)
protected

Initializes a new instance of the SplitCommand class.

Parameters
meThe module which created this instance.
cmdThe name of the command.
minparaThe minimum number of parameters that the command accepts.
maxparaThe maximum number of parameters that the command accepts.

Member Function Documentation

◆ Handle()

CmdResult SplitCommand::Handle ( User user,
const Params parameters 
)
overridevirtual

Handle the command from a user.

Parameters
userThe user who issued the command.
parametersThe parameters for the command.
Returns
Returns CmdResult::FAILURE on failure, CmdResult::SUCCESS on success, or CmdResult::INVALID if the command was malformed.

Implements Command.

◆ HandleLocal()

CmdResult SplitCommand::HandleLocal ( LocalUser user,
const Params parameters 
)
virtual

Handle the command from a local user.

Parameters
userThe user who issued the command.
parametersThe parameters for the command.
Returns
Returns CmdResult::FAILURE on failure, CmdResult::SUCCESS on success, or CmdResult::INVALID if the command was malformed.

◆ HandleRemote()

CmdResult SplitCommand::HandleRemote ( RemoteUser user,
const Params parameters 
)
virtual

Handle the command from a remote user.

Parameters
userThe user who issued the command.
parametersThe parameters for the command.
Returns
Returns CmdResult::FAILURE on failure, CmdResult::SUCCESS on success, or CmdResult::INVALID if the command was malformed.

◆ HandleServer()

CmdResult SplitCommand::HandleServer ( FakeUser user,
const Params parameters 
)
virtual

Handle the command from a server user.

Parameters
userThe user who issued the command.
parametersThe parameters for the command.
Returns
Returns CmdResult::FAILURE on failure, CmdResult::SUCCESS on success, or CmdResult::INVALID if the command was malformed.

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