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

Public Member Functions

 NewsBase (Module *creator, const Anope::string &newstype)
 
virtual ~NewsBase ()
 
virtual void Execute (CommandSource &source, const std::vector< Anope::string > &params)=0
 
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 const Anope::string GetDesc (CommandSource &source) 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)
 

Protected Member Functions

void DoList (CommandSource &source, NewsType ntype, const char **msgs)
 
void DoAdd (CommandSource &source, const std::vector< Anope::string > &params, NewsType ntype, const char **msgs)
 
void DoDel (CommandSource &source, const std::vector< Anope::string > &params, NewsType ntype, const char **msgs)
 
void DoNews (CommandSource &source, const std::vector< Anope::string > &params, NewsType ntype)
 
- 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)
 

Private Attributes

ServiceReference< NewsServicens
 

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
 

Detailed Description

Definition at line 143 of file os_news.cpp.

Constructor & Destructor Documentation

NewsBase::NewsBase ( Module creator,
const Anope::string newstype 
)
inline

Definition at line 276 of file os_news.cpp.

References _, and Command::SetSyntax().

virtual NewsBase::~NewsBase ( )
inlinevirtual

Definition at line 283 of file os_news.cpp.

Member Function Documentation

void NewsBase::DoAdd ( CommandSource source,
const std::vector< Anope::string > &  params,
NewsType  ntype,
const char **  msgs 
)
inlineprotected
void NewsBase::DoDel ( CommandSource source,
const std::vector< Anope::string > &  params,
NewsType  ntype,
const char **  msgs 
)
inlineprotected
void NewsBase::DoList ( CommandSource source,
NewsType  ntype,
const char **  msgs 
)
inlineprotected
void NewsBase::DoNews ( CommandSource source,
const std::vector< Anope::string > &  params,
NewsType  ntype 
)
inlineprotected
virtual void NewsBase::Execute ( CommandSource source,
const std::vector< Anope::string > &  params 
)
pure virtual

Execute this command.

Parameters
sourceThe source
paramsCommand parameters

Implements Command.

Implemented in CommandOSRandomNews, CommandOSOperNews, and CommandOSLogonNews.

virtual bool NewsBase::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 CommandOSRandomNews, CommandOSOperNews, and CommandOSLogonNews.

Field Documentation

ServiceReference<NewsService> NewsBase::ns
private

Definition at line 145 of file os_news.cpp.


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