Anope IRC Services  Version 2.0
Public Member Functions | Private Member Functions
CommandOSSXLineBase Class Referenceabstract
Inheritance diagram for CommandOSSXLineBase:
Inheritance graph
[legend]
Collaboration diagram for CommandOSSXLineBase:
Collaboration graph
[legend]

Public Member Functions

 CommandOSSXLineBase (Module *creator, const Anope::string &cmd)
 
const Anope::string GetDesc (CommandSource &source) const anope_override
 
void Execute (CommandSource &source, const std::vector< Anope::string > &params) anope_override
 
virtual bool OnHelp (CommandSource &source, const Anope::string &subcommand)=0
 
- Public Member Functions inherited from Command
virtual ~Command ()
 
bool AllowUnregistered () const
 
bool RequireUser () const
 
virtual void OnServHelp (CommandSource &source)
 
virtual void OnSyntaxError (CommandSource &source, const Anope::string &subcommand)
 
- Public Member Functions inherited from Service
 Service (Module *o, const Anope::string &t, const Anope::string &n)
 
virtual ~Service ()
 
void Register ()
 
void Unregister ()
 
- Public Member Functions inherited from Base
 Base ()
 
virtual ~Base ()
 
void AddReference (ReferenceBase *r)
 
void DelReference (ReferenceBase *r)
 

Private Member Functions

virtual XLineManagerxlm ()=0
 
virtual void OnAdd (CommandSource &source, const std::vector< Anope::string > &params)=0
 
void OnDel (CommandSource &source, const std::vector< Anope::string > &params)
 
void ProcessList (CommandSource &source, const std::vector< Anope::string > &params, ListFormatter &list)
 
void OnList (CommandSource &source, const std::vector< Anope::string > &params)
 
void OnView (CommandSource &source, const std::vector< Anope::string > &params)
 
void OnClear (CommandSource &source)
 

Additional Inherited Members

- Static Public Member Functions inherited from Command
static void Run (CommandSource &source, const Anope::string &message)
 
static bool FindCommandFromService (const Anope::string &command_service, BotInfo *&bi, Anope::string &name)
 
- Static Public Member Functions inherited from Service
static ServiceFindService (const Anope::string &t, const Anope::string &n)
 
static std::vector< Anope::stringGetServiceKeys (const Anope::string &t)
 
static void AddAlias (const Anope::string &t, const Anope::string &n, const Anope::string &v)
 
static void DelAlias (const Anope::string &t, const Anope::string &n)
 
- Data Fields inherited from Command
size_t max_params
 
size_t min_params
 
Modulemodule
 
- Data Fields inherited from Service
Moduleowner
 
Anope::string type
 
Anope::string name
 
- Protected Member Functions inherited from Command
 Command (Module *owner, const Anope::string &sname, size_t min_params, size_t max_params=0)
 
void SetDesc (const Anope::string &d)
 
void ClearSyntax ()
 
void SetSyntax (const Anope::string &s)
 
void SendSyntax (CommandSource &)
 
void AllowUnregistered (bool b)
 
void RequireUser (bool b)
 

Detailed Description

Definition at line 57 of file os_sxline.cpp.

Constructor & Destructor Documentation

CommandOSSXLineBase::CommandOSSXLineBase ( Module creator,
const Anope::string cmd 
)
inline

Definition at line 221 of file os_sxline.cpp.

Member Function Documentation

void CommandOSSXLineBase::Execute ( CommandSource source,
const std::vector< Anope::string > &  params 
)
inlinevirtual

Execute this command.

Parameters
sourceThe source
paramsCommand parameters

Implements Command.

Definition at line 230 of file os_sxline.cpp.

References Anope::string::equals_ci(), OnAdd(), OnClear(), OnDel(), OnList(), Command::OnSyntaxError(), and OnView().

const Anope::string CommandOSSXLineBase::GetDesc ( CommandSource source) const
inlinevirtual

Get the command description

Parameters
sourceThe source wanting the command description
Returns
The commands description

Reimplemented from Command.

Definition at line 225 of file os_sxline.cpp.

References _, Anope::string::c_str(), CommandSource::command, CommandSource::GetAccount(), Anope::printf(), Language::Translate(), and Anope::string::upper().

virtual void CommandOSSXLineBase::OnAdd ( CommandSource source,
const std::vector< Anope::string > &  params 
)
privatepure virtual

Implemented in CommandOSSQLine, and CommandOSSNLine.

Referenced by Execute().

void CommandOSSXLineBase::OnClear ( CommandSource source)
inlineprivate
void CommandOSSXLineBase::OnDel ( CommandSource source,
const std::vector< Anope::string > &  params 
)
inlineprivate
virtual bool CommandOSSXLineBase::OnHelp ( CommandSource source,
const Anope::string subcommand 
)
pure virtual

Requested when the user is requesting help on this command. Help on this command should be sent to the user.

Parameters
sourceThe source
subcommandThe subcommand the user is requesting help on, or an empty string. (e.g. /ns help set foo bar lol gives a subcommand of "FOO BAR LOL")
Returns
true if help was provided to the user, false otherwise.

Reimplemented from Command.

Implemented in CommandOSSQLine, and CommandOSSNLine.

void CommandOSSXLineBase::OnList ( CommandSource source,
const std::vector< Anope::string > &  params 
)
inlineprivate

Definition at line 188 of file os_sxline.cpp.

References _, ListFormatter::AddColumn(), CommandSource::GetAccount(), and ProcessList().

Referenced by Execute().

void CommandOSSXLineBase::OnView ( CommandSource source,
const std::vector< Anope::string > &  params 
)
inlineprivate

Definition at line 196 of file os_sxline.cpp.

References _, ListFormatter::AddColumn(), CommandSource::GetAccount(), and ProcessList().

Referenced by Execute().

void CommandOSSXLineBase::ProcessList ( CommandSource source,
const std::vector< Anope::string > &  params,
ListFormatter list 
)
inlineprivate
virtual XLineManager* CommandOSSXLineBase::xlm ( )
privatepure virtual

Implemented in CommandOSSQLine, and CommandOSSNLine.

Referenced by OnClear(), OnDel(), and ProcessList().


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