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

Public Member Functions

 NickServCore (const Anope::string &modname, const Anope::string &creator)
 
 ~NickServCore ()
 
void OnShutdown () anope_override
 
void OnRestart () anope_override
 
void Validate (User *u) anope_override
 
void OnUserLogin (User *u) anope_override
 
void Collide (User *u, NickAlias *na) anope_override
 
void Release (NickAlias *na) anope_override
 
void OnReload (Configuration::Conf *conf) anope_override
 
void OnDelNick (NickAlias *na) anope_override
 
void OnDelCore (NickCore *nc) anope_override
 
void OnChangeCoreDisplay (NickCore *nc, const Anope::string &newdisplay) anope_override
 
void OnNickIdentify (User *u) anope_override
 
void OnNickGroup (User *u, NickAlias *target) anope_override
 
void OnNickUpdate (User *u) anope_override
 
void OnUserConnect (User *u, bool &exempt) anope_override
 
void OnPostUserLogoff (User *u) anope_override
 
void OnServerSync (Server *s) anope_override
 
void OnUserNickChange (User *u, const Anope::string &oldnick) anope_override
 
void OnUserModeSet (const MessageSource &setter, User *u, const Anope::string &mname) anope_override
 
EventReturn OnPreHelp (CommandSource &source, const std::vector< Anope::string > &params) anope_override
 
void OnPostHelp (CommandSource &source, const std::vector< Anope::string > &params) anope_override
 
void OnNickCoreCreate (NickCore *nc)
 
void OnUserQuit (User *u, const Anope::string &msg)
 
void OnExpireTick () anope_override
 
void OnNickInfo (CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) anope_override
 
- Public Member Functions inherited from Module
 Module (const Anope::string &modname, const Anope::string &loadernick, ModType type=THIRD)
 
virtual ~Module ()
 
void SetPermanent (bool state)
 
bool GetPermanent () const
 
void SetVersion (const Anope::string &version)
 
void SetAuthor (const Anope::string &author)
 
ModuleVersion GetVersion () const
 
virtual void OnPreUserKicked (const MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg)
 
virtual void OnUserKicked (const MessageSource &source, User *target, const Anope::string &channel, ChannelStatus &status, const Anope::string &kickmsg)
 
virtual EventReturn OnPreBotAssign (User *sender, ChannelInfo *ci, BotInfo *bi)
 
virtual void OnBotAssign (User *sender, ChannelInfo *ci, BotInfo *bi)
 
virtual EventReturn OnBotUnAssign (User *sender, ChannelInfo *ci)
 
virtual void OnNewServer (Server *s)
 
virtual EventReturn OnPreCommand (CommandSource &source, Command *command, std::vector< Anope::string > &params)
 
virtual void OnPostCommand (CommandSource &source, Command *command, const std::vector< Anope::string > &params)
 
virtual void OnSaveDatabase ()
 
virtual EventReturn OnLoadDatabase ()
 
virtual EventReturn OnEncrypt (const Anope::string &src, Anope::string &dest)
 
virtual EventReturn OnDecrypt (const Anope::string &hashm, const Anope::string &src, Anope::string &dest)
 
virtual EventReturn OnBotFantasy (CommandSource &source, Command *c, ChannelInfo *ci, const std::vector< Anope::string > &params)
 
virtual EventReturn OnBotNoFantasyAccess (CommandSource &source, Command *c, ChannelInfo *ci, const std::vector< Anope::string > &params)
 
virtual void OnBotBan (User *u, ChannelInfo *ci, const Anope::string &mask)
 
virtual void OnBadWordAdd (ChannelInfo *ci, const BadWord *bw)
 
virtual void OnBadWordDel (ChannelInfo *ci, const BadWord *bw)
 
virtual void OnCreateBot (BotInfo *bi)
 
virtual void OnDelBot (BotInfo *bi)
 
virtual EventReturn OnBotKick (BotInfo *bi, Channel *c, User *u, const Anope::string &reason)
 
virtual void OnPrePartChannel (User *u, Channel *c)
 
virtual void OnPartChannel (User *u, Channel *c, const Anope::string &channel, const Anope::string &msg)
 
virtual void OnLeaveChannel (User *u, Channel *c)
 
virtual void OnJoinChannel (User *u, Channel *c)
 
virtual void OnTopicUpdated (Channel *c, const Anope::string &user, const Anope::string &topic)
 
virtual void OnPreChanExpire (ChannelInfo *ci, bool &expire)
 
virtual void OnChanExpire (ChannelInfo *ci)
 
virtual void OnPreServerConnect ()
 
virtual void OnServerConnect ()
 
virtual void OnPreUplinkSync (Server *serv)
 
virtual void OnServerDisconnect ()
 
virtual void OnPreNickExpire (NickAlias *na, bool &expire)
 
virtual void OnNickExpire (NickAlias *na)
 
virtual void OnDefconLevel (int level)
 
virtual EventReturn OnExceptionAdd (Exception *ex)
 
virtual void OnExceptionDel (CommandSource &source, Exception *ex)
 
virtual EventReturn OnAddXLine (CommandSource &source, const XLine *x, XLineManager *xlm)
 
virtual void OnDelXLine (CommandSource &source, const XLine *x, XLineManager *xlm)
 
virtual EventReturn IsServicesOper (User *u)
 
virtual void OnServerQuit (Server *server)
 
virtual void OnPreUserLogoff (User *u)
 
virtual void OnBotCreate (BotInfo *bi)
 
virtual void OnBotChange (BotInfo *bi)
 
virtual void OnBotDelete (BotInfo *bi)
 
virtual void OnAccessDel (ChannelInfo *ci, CommandSource &source, ChanAccess *access)
 
virtual void OnAccessAdd (ChannelInfo *ci, CommandSource &source, ChanAccess *access)
 
virtual void OnAccessClear (ChannelInfo *ci, CommandSource &source)
 
virtual void OnLevelChange (CommandSource &source, ChannelInfo *ci, const Anope::string &priv, int16_t what)
 
virtual EventReturn OnChanDrop (CommandSource &source, ChannelInfo *ci)
 
virtual void OnChanRegistered (ChannelInfo *ci)
 
virtual void OnChanSuspend (ChannelInfo *ci)
 
virtual void OnChanUnsuspend (ChannelInfo *ci)
 
virtual void OnCreateChan (ChannelInfo *ci)
 
virtual void OnDelChan (ChannelInfo *ci)
 
virtual void OnChannelCreate (Channel *c)
 
virtual void OnChannelDelete (Channel *c)
 
virtual void OnAkickAdd (CommandSource &source, ChannelInfo *ci, const AutoKick *ak)
 
virtual void OnAkickDel (CommandSource &source, ChannelInfo *ci, const AutoKick *ak)
 
virtual EventReturn OnCheckKick (User *u, Channel *c, Anope::string &mask, Anope::string &reason)
 
virtual void OnChanInfo (CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden)
 
virtual EventReturn OnCheckPriv (const ChanAccess *access, const Anope::string &priv)
 
virtual EventReturn OnGroupCheckPriv (const AccessGroup *group, const Anope::string &priv)
 
virtual void OnNickDrop (CommandSource &source, NickAlias *na)
 
virtual void OnNickLogout (User *u)
 
virtual void OnNickRegister (User *user, NickAlias *na, const Anope::string &pass)
 
virtual void OnNickSuspend (NickAlias *na)
 
virtual void OnNickUnsuspended (NickAlias *na)
 
virtual void OnNickClearAccess (NickCore *nc)
 
virtual void OnNickAddAccess (NickCore *nc, const Anope::string &entry)
 
virtual void OnNickEraseAccess (NickCore *nc, const Anope::string &entry)
 
virtual void OnNickClearCert (NickCore *nc)
 
virtual void OnNickAddCert (NickCore *nc, const Anope::string &entry)
 
virtual void OnNickEraseCert (NickCore *nc, const Anope::string &entry)
 
virtual void OnBotInfo (CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info)
 
virtual void OnCheckAuthentication (User *u, IdentifyRequest *req)
 
virtual void OnFingerprint (User *u)
 
virtual void OnUserAway (User *u, const Anope::string &message)
 
virtual void OnInvite (User *source, Channel *c, User *targ)
 
virtual void OnDeleteVhost (NickAlias *na)
 
virtual void OnSetVhost (NickAlias *na)
 
virtual void OnSetDisplayedHost (User *)
 
virtual void OnMemoSend (const Anope::string &source, const Anope::string &target, MemoInfo *mi, Memo *m)
 
virtual void OnMemoDel (const Anope::string &target, MemoInfo *mi, const Memo *m)
 
virtual EventReturn OnChannelModeSet (Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string &param)
 
virtual EventReturn OnChannelModeUnset (Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string &param)
 
virtual void OnUserModeUnset (const MessageSource &setter, User *u, const Anope::string &mname)
 
virtual void OnChannelModeAdd (ChannelMode *cm)
 
virtual void OnUserModeAdd (UserMode *um)
 
virtual EventReturn OnMLock (ChannelInfo *ci, ModeLock *lock)
 
virtual EventReturn OnUnMLock (ChannelInfo *ci, ModeLock *lock)
 
virtual void OnModuleLoad (User *u, Module *m)
 
virtual void OnModuleUnload (User *u, Module *m)
 
virtual void OnUplinkSync (Server *s)
 
virtual EventReturn OnBotPrivmsg (User *u, BotInfo *bi, Anope::string &message)
 
virtual void OnBotNotice (User *u, BotInfo *bi, Anope::string &message)
 
virtual void OnPrivmsg (User *u, Channel *c, Anope::string &msg)
 
virtual void OnLog (Log *l)
 
virtual void OnLogMessage (LogInfo *li, const Log *l, const Anope::string &msg)
 
virtual void OnDnsRequest (DNS::Query &req, DNS::Query *reply)
 
virtual void OnCheckModes (Reference< Channel > &c)
 
virtual void OnChannelSync (Channel *c)
 
virtual void OnSetCorrectModes (User *user, Channel *chan, AccessGroup &access, bool &give_modes, bool &take_modes)
 
virtual void OnSerializeCheck (Serialize::Type *)
 
virtual void OnSerializableConstruct (Serializable *)
 
virtual void OnSerializableDestruct (Serializable *)
 
virtual void OnSerializableUpdate (Serializable *)
 
virtual void OnSerializeTypeCreate (Serialize::Type *)
 
virtual EventReturn OnSetChannelOption (CommandSource &source, Command *cmd, ChannelInfo *ci, const Anope::string &setting)
 
virtual EventReturn OnSetNickOption (CommandSource &source, Command *cmd, NickCore *nc, const Anope::string &setting)
 
virtual EventReturn OnMessage (MessageSource &source, Anope::string &command, std::vector< Anope::string > &param)
 
virtual EventReturn OnCanSet (User *u, const ChannelMode *cm)
 
virtual EventReturn OnCheckDelete (Channel *)
 
virtual EventReturn OnNickValidate (User *u, NickAlias *na)
 
- Public Member Functions inherited from Extensible
virtual ~Extensible ()
 
template<typename T >
T * GetExt (const Anope::string &name) const
 
bool HasExt (const Anope::string &name) const
 
template<typename T >
T * Extend (const Anope::string &name, const T &what)
 
template<typename T >
T * Extend (const Anope::string &name)
 
template<typename T >
T * Require (const Anope::string &name)
 
template<typename T >
void Shrink (const Anope::string &name)
 
template<>
bool * Extend (const Anope::string &name, const bool &what)
 
- Public Member Functions inherited from NickServService
 NickServService (Module *m)
 
- 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

void OnCancel (User *u, NickAlias *na)
 

Private Attributes

Reference< BotInfoNickServ
 
std::vector< Anope::stringdefaults
 
ExtensibleItem< bool > held
 
ExtensibleItem< bool > collided
 

Additional Inherited Members

- Static Public Member Functions inherited from Extensible
static void ExtensibleSerialize (const Extensible *, const Serializable *, Serialize::Data &data)
 
static void ExtensibleUnserialize (Extensible *, Serializable *, Serialize::Data &data)
 
- 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 Module
Anope::string name
 
ModType type
 
Anope::string filename
 
void * handle
 
time_t created
 
Anope::string version
 
Anope::string author
 
- Data Fields inherited from Extensible
std::set< ExtensibleBase * > extension_items
 
- Data Fields inherited from Service
Moduleowner
 
Anope::string type
 
Anope::string name
 

Detailed Description

Definition at line 94 of file nickserv.cpp.

Constructor & Destructor Documentation

NickServCore::NickServCore ( const Anope::string modname,
const Anope::string creator 
)
inline

Definition at line 116 of file nickserv.cpp.

NickServCore::~NickServCore ( )
inline

Definition at line 121 of file nickserv.cpp.

References OnShutdown().

Member Function Documentation

void NickServCore::Collide ( User u,
NickAlias na 
)
inlinevirtual
void NickServCore::OnCancel ( User u,
NickAlias na 
)
inlineprivate
void NickServCore::OnChangeCoreDisplay ( NickCore nc,
const Anope::string newdisplay 
)
inlinevirtual

Called on change_core_display()

Parameters
ncpointer to the NickCore
newdisplaythe new display

Reimplemented from Module.

Definition at line 314 of file nickserv.cpp.

References LOG_NORMAL.

void NickServCore::OnDelCore ( NickCore nc)
inlinevirtual

Called on delcore()

Parameters
ncpointer to the NickCore

Reimplemented from Module.

Definition at line 298 of file nickserv.cpp.

References FOREACH_MOD, IRCD, User::Logout(), Module::OnNickLogout(), User::RemoveMode(), and IRCDProto::SendLogout().

void NickServCore::OnDelNick ( NickAlias na)
inlinevirtual

Called on delnick() @ param na pointer to the nickalias

Reimplemented from Module.

Definition at line 287 of file nickserv.cpp.

References User::Account(), User::Find(), IRCD, User::Logout(), User::RemoveMode(), and IRCDProto::SendLogout().

void NickServCore::OnExpireTick ( )
inlinevirtual

Called every options:expiretimeout seconds. Should be used to expire nicks, channels, etc.

Reimplemented from Module.

Definition at line 497 of file nickserv.cpp.

References Anope::CurTime, User::Find(), FOREACH_MOD, User::IsIdentified(), User::IsRecognized(), NickAlias::last_seen, LOG_NORMAL, NickAlias::nc, NickAlias::nick, NickAliasList, Anope::NoExpire, Module::OnNickExpire(), Module::OnPreNickExpire(), and Anope::ReadOnly.

void NickServCore::OnNickCoreCreate ( NickCore nc)
inlinevirtual

Called when a nickcore is created

Parameters
ncThe nickcore

Reimplemented from Module.

Definition at line 476 of file nickserv.cpp.

References Extensible::Extend().

void NickServCore::OnNickGroup ( User u,
NickAlias target 
)
inlinevirtual

Called when a user groups their nick

Parameters
uThe user grouping
targetThe target they're grouping to

Reimplemented from Module.

Definition at line 348 of file nickserv.cpp.

void NickServCore::OnNickIdentify ( User u)
inlinevirtual

Called when a user identifies to a nick

Parameters
uThe user

Reimplemented from Module.

Definition at line 319 of file nickserv.cpp.

References _, Anope::string::c_str(), ChanUserContainer::chan, Anope::string::empty(), Configuration::Block::Get(), User::nick, and Channel::SetCorrectModes().

void NickServCore::OnNickInfo ( CommandSource source,
NickAlias na,
InfoFormatter info,
bool  show_hidden 
)
inlinevirtual

Called when a user requests info for a nick

Parameters
sourceThe user requesting info
naThe nick the user is requesting info from
infoData to show the user requesting information
show_hiddentrue if we should show the user everything

Reimplemented from Module.

Definition at line 529 of file nickserv.cpp.

References _, Anope::CurTime, Anope::NoExpire, and Anope::strftime().

void NickServCore::OnNickUpdate ( User u)
inlinevirtual

Called when a user does /ns update

Parameters
uThe user

Reimplemented from Module.

Definition at line 354 of file nickserv.cpp.

References ChanUserContainer::chan, and Channel::SetCorrectModes().

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

Called when someone uses the generic/help command

Parameters
sourceCommand source
paramsParams

Reimplemented from Module.

Definition at line 452 of file nickserv.cpp.

References _, Anope::string::c_str(), User::nick, and NickServ.

void NickServCore::OnPostUserLogoff ( User u)
inlinevirtual

Reimplemented from Module.

Definition at line 379 of file nickserv.cpp.

References NickAlias::Find(), and OnCancel().

EventReturn NickServCore::OnPreHelp ( CommandSource source,
const std::vector< Anope::string > &  params 
)
inlinevirtual

Called when someone uses the generic/help command

Parameters
sourceCommand source
paramsParams
Returns
EVENT_STOP to stop processing

Reimplemented from Module.

Definition at line 432 of file nickserv.cpp.

References _, Anope::string::c_str(), EVENT_CONTINUE, User::nick, and NickServ.

void NickServCore::OnReload ( Configuration::Conf conf)
inlinevirtual

Called when Services' configuration is being (re)loaded.

Parameters
confThe config that is being built now and will replace the global Config object
Exceptions
AConfigException to abort the config (re)loading process.

Reimplemented from Module.

Definition at line 263 of file nickserv.cpp.

References Anope::string::empty(), BotInfo::Find(), sepstream::GetTokens(), and Module::name.

void NickServCore::OnRestart ( )
inlinevirtual

Called when services restart

Reimplemented from Module.

Definition at line 135 of file nickserv.cpp.

References OnShutdown().

void NickServCore::OnServerSync ( Server s)
inlinevirtual

Called when a server is synced

Parameters
sThe server, can be our uplink server

Reimplemented from Module.

Definition at line 386 of file nickserv.cpp.

References User::HasMode(), User::IsIdentified(), User::RemoveMode(), User::server, UserListByNick, and Validate().

void NickServCore::OnShutdown ( )
inlinevirtual

Called when services shutdown

Reimplemented from Module.

Definition at line 126 of file nickserv.cpp.

References NickAliasList, and Release().

Referenced by OnRestart(), and ~NickServCore().

void NickServCore::OnUserConnect ( User u,
bool &  exempt 
)
inlinevirtual

Called when a new user connects to the network.

Parameters
uThe connecting user.
exemptset to true/is true if the user should be excepted from bans etc

Reimplemented from Module.

Definition at line 365 of file nickserv.cpp.

References Anope::string::empty(), NickAlias::Find(), and Validate().

void NickServCore::OnUserLogin ( User u)
inlinevirtual

Called when a user is logged into an account

Parameters
uThe user

Reimplemented from Module.

Definition at line 199 of file nickserv.cpp.

References Anope::string::c_str(), Anope::string::empty(), NickAlias::Find(), and NickAlias::nc.

void NickServCore::OnUserModeSet ( const MessageSource setter,
User u,
const Anope::string mname 
)
inlinevirtual

Called when a mode is set on a user

Parameters
setterwho/what is setting the mode
uThe user
mnameThe mode name

Reimplemented from Module.

Definition at line 426 of file nickserv.cpp.

void NickServCore::OnUserNickChange ( User u,
const Anope::string oldnick 
)
inlinevirtual

Called after a user changed the nick

Parameters
uThe user.
oldnickThe old nick of the user

Reimplemented from Module.

Definition at line 402 of file nickserv.cpp.

References NickAlias::Find(), IRCD, OnCancel(), IRCDProto::SendLogin(), and Validate().

void NickServCore::OnUserQuit ( User u,
const Anope::string msg 
)
inlinevirtual

Called when a user quits, or is killed

Parameters
uThe user
msgThe quit message

Reimplemented from Module.

Definition at line 483 of file nickserv.cpp.

References Anope::CurTime, Anope::string::empty(), NickAlias::Find(), Server::GetQuitReason(), User::IsIdentified(), User::IsRecognized(), NickAlias::last_quit, NickAlias::last_seen, NickAlias::nc, User::nick, and User::server.

void NickServCore::Release ( NickAlias na)
inlinevirtual
void NickServCore::Validate ( User u)
inlinevirtual

Field Documentation

ExtensibleItem<bool> NickServCore::collided
private

Definition at line 98 of file nickserv.cpp.

std::vector<Anope::string> NickServCore::defaults
private

Definition at line 97 of file nickserv.cpp.

ExtensibleItem<bool> NickServCore::held
private

Definition at line 98 of file nickserv.cpp.

Reference<BotInfo> NickServCore::NickServ
private

Definition at line 96 of file nickserv.cpp.

Referenced by OnPostHelp(), and OnPreHelp().


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