Anope IRC Services  Version 2.0
Public Member Functions | Data Fields | Private Attributes
Module Class Reference

#include <modules.h>

Inherits Extensible.

Inherited by BotServCore, BSAssign, BSAutoAssign, BSBadwords, BSBot, BSBotList, BSControl, BSInfo, BSKick, BSSet, ChanServCore, CSAccess, CSAKick, CSBan, CSClone, CSDrop, CSEnforce, CSEntryMessage, CSFlags, CSGetKey, CSInfo, CSInvite, CSKick, CSList, CSLog, CSMode, CSRegister, CSSeen, CSSet, CSSetMisc, CSStats, CSStatus, CSSuspend, CSSync, CSTop, CSTopic, CSUnban, CSUpDown, CSXOP, DatabaseRedis, DBFlatFile, DBMySQL, DBOld, DBSQL, EBCRYPT, EMD5, ENone, EOld, ESHA1, ESHA256, Fantasy, GLGlobal, GlobalCore, GnuTLSModule, Greet, Help, HelpChannel, HostServCore, HSDel, HSGroup, HSList, HSOff, HSOn, HSRequest, HSSet, HTTPD, IRC2SQL, LDAPOper, MChanstats, MemoServCore, ModuleDNS, ModuleDNS, ModuleDNSBL, ModuleLDAP, ModuleProxyScan, ModuleRedis, ModuleRegexPCRE, ModuleRegexPOSIX, ModuleRegexTRE, ModuleRewrite, ModuleSASL, ModuleSASLDHAES, ModuleSASLDHBS, ModuleSQL, ModuleSQLAuthentication, ModuleSQLite, ModuleSQLOper, ModuleWebCPanel, ModuleXMLRPC, ModuleXMLRPCMain, MSCancel, MSCheck, MSDel, MSIgnore, MSInfo, MSList, MSRead, MSRSend, MSSend, MSSendAll, MSSet, MSStaff, NickServCore, NSAccess, NSAJoin, NSAList, NSCert, NSDrop, NSGetEMail, NSGetPass, NSGroup, NSIdentify, NSIdentifyLDAP, NSInfo, NSList, NSLogout, NSMaxEmail, NSRecover, NSRegister, NSResetPass, NSSet, NSSetMisc, NSStatus, NSSuspend, NSUpdate, OperServCore, OSAKill, OSChanKill, OSConfig, OSDefcon, OSForbid, OSIgnore, OSInfo, OSJupe, OSKick, OSKill, OSList, OSLogin, OSLogSearch, OSMode, OSModInfo, OSModule, OSNews, OSNOOP, OSOLine, OSOper, OSReload, OSSession, OSSet, OSShutdown, OSStats, OSSVS, OSSXLine, OSUpdate, ProtoBahamut, ProtoCharybdis, ProtoHybrid, ProtoInspIRCd12, ProtoInspIRCd20, ProtongIRCd, ProtoPlexus, ProtoRatbox, ProtoUnreal, SQLLog, SSLModule, and StatusUpdate.

Collaboration diagram for Module:
Collaboration graph
[legend]

Public Member Functions

 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 void OnReload (Configuration::Conf *conf)
 
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 OnUserConnect (User *u, bool &exempt)
 
virtual void OnNewServer (Server *s)
 
virtual void OnUserNickChange (User *u, const Anope::string &oldnick)
 
virtual EventReturn OnPreHelp (CommandSource &source, const std::vector< Anope::string > &params)
 
virtual void OnPostHelp (CommandSource &source, const std::vector< Anope::string > &params)
 
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 OnRestart ()
 
virtual void OnShutdown ()
 
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 OnUserQuit (User *u, const Anope::string &msg)
 
virtual void OnPreUserLogoff (User *u)
 
virtual void OnPostUserLogoff (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 OnNickGroup (User *u, NickAlias *target)
 
virtual void OnNickIdentify (User *u)
 
virtual void OnUserLogin (User *u)
 
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 OnDelNick (NickAlias *na)
 
virtual void OnNickCoreCreate (NickCore *nc)
 
virtual void OnDelCore (NickCore *nc)
 
virtual void OnChangeCoreDisplay (NickCore *nc, const Anope::string &newdisplay)
 
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 OnNickInfo (CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden)
 
virtual void OnBotInfo (CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info)
 
virtual void OnCheckAuthentication (User *u, IdentifyRequest *req)
 
virtual void OnNickUpdate (User *u)
 
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 OnUserModeSet (const MessageSource &setter, User *u, const Anope::string &mname)
 
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 OnServerSync (Server *s)
 
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 void OnExpireTick ()
 
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)
 

Data Fields

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
 

Private Attributes

bool permanent
 

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)
 

Detailed Description

Every module in Anope is actually a class.

Definition at line 214 of file modules.h.

Constructor & Destructor Documentation

Module::Module ( const Anope::string modname,
const Anope::string loadernick,
ModType  type = THIRD 
)

Creates and initialises a new module.

Parameters
modnameThe module name
loadernickThe nickname of the user loading the module.
typeThe module type

Definition at line 19 of file module.cpp.

References Anope::string::c_str(), created, Anope::CurTime, Language::Domains, ModuleManager::FindModule(), sepstream::GetToken(), handle, Anope::IsFile(), Language::Languages, Anope::LastError(), Anope::LocaleDir, ModuleManager::Modules, name, Anope::NoThird, permanent, SetAuthor(), SetVersion(), THIRD, type, VENDOR, and Anope::Version().

Module::~Module ( )
virtual

Destroys a module, freeing resources it has allocated.

Definition at line 65 of file module.cpp.

References TimerManager::DeleteTimersFor(), ModuleManager::DetachAll(), Language::Domains, ModuleManager::Modules, IdentifyRequest::ModuleUnload(), and name.

Member Function Documentation

bool Module::GetPermanent ( ) const

Retrieves whether or not a given module is permanent.

Returns
true if the module is permanent, false else.

Definition at line 89 of file module.cpp.

References permanent.

Referenced by CommandOSModReLoad::Execute(), and CommandOSModUnLoad::Execute().

ModuleVersion Module::GetVersion ( ) const

Get the version of Anope this module was compiled against

Returns
The version

Definition at line 620 of file misc.cpp.

Referenced by ModuleManager::LoadModule().

virtual EventReturn Module::IsServicesOper ( User u)
inlinevirtual

Called when a user is checked for whether they are a services oper

Parameters
uThe user
Returns
EVENT_ALLOW to allow, anything else to deny

Reimplemented in OSLogin.

Definition at line 563 of file modules.h.

virtual void Module::OnAccessAdd ( ChannelInfo ci,
CommandSource source,
ChanAccess access 
)
inlinevirtual

Called when access is added

Parameters
ciThe channel
sourceThe source of the command
accessThe access changed

Reimplemented in StatusUpdate.

Definition at line 612 of file modules.h.

virtual void Module::OnAccessClear ( ChannelInfo ci,
CommandSource source 
)
inlinevirtual

Called when the access list is cleared

Parameters
ciThe channel
uThe user who cleared the access

Definition at line 618 of file modules.h.

virtual void Module::OnAccessDel ( ChannelInfo ci,
CommandSource source,
ChanAccess access 
)
inlinevirtual

Called after an access entry is deleted from a channel

Parameters
ciThe channel
sourceThe source of the command
accessThe access entry that was removed

Reimplemented in StatusUpdate.

Definition at line 605 of file modules.h.

virtual EventReturn Module::OnAddXLine ( CommandSource source,
const XLine x,
XLineManager xlm 
)
inlinevirtual

Called before a XLine is added

Parameters
sourceThe source of the XLine
xThe XLine
xlmThe xline manager it was added to
Returns
EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it

Definition at line 550 of file modules.h.

virtual void Module::OnAkickAdd ( CommandSource source,
ChannelInfo ci,
const AutoKick ak 
)
inlinevirtual

Called after adding an akick to a channel

Parameters
sourceThe source of the command
ciThe channel
akThe akick

Definition at line 675 of file modules.h.

virtual void Module::OnAkickDel ( CommandSource source,
ChannelInfo ci,
const AutoKick ak 
)
inlinevirtual

Called before removing an akick from a channel

Parameters
sourceThe source of the command
ciThe channel
akThe akick

Definition at line 682 of file modules.h.

virtual void Module::OnBadWordAdd ( ChannelInfo ci,
const BadWord bw 
)
inlinevirtual

Called before a badword is added to the badword list

Parameters
ciThe channel
bwThe badword

Definition at line 422 of file modules.h.

virtual void Module::OnBadWordDel ( ChannelInfo ci,
const BadWord bw 
)
inlinevirtual

Called before a badword is deleted from a channel

Parameters
ciThe channel
bwThe badword

Definition at line 428 of file modules.h.

virtual void Module::OnBotAssign ( User sender,
ChannelInfo ci,
BotInfo bi 
)
inlinevirtual

Called when a bot is assigned ot a channel

Reimplemented in BotServCore.

Definition at line 324 of file modules.h.

virtual void Module::OnBotBan ( User u,
ChannelInfo ci,
const Anope::string mask 
)
inlinevirtual

Called when a bot places a ban

Parameters
uUser being banned
ciChannel the ban is placed on
maskThe mask being banned

Reimplemented in BSSet.

Definition at line 416 of file modules.h.

Referenced by BSKick::check_ban().

virtual void Module::OnBotChange ( BotInfo bi)
inlinevirtual

Called when a bot is changed

Parameters
biThe bot

Definition at line 593 of file modules.h.

virtual void Module::OnBotCreate ( BotInfo bi)
inlinevirtual

Called when a new bot is made

Parameters
biThe bot

Definition at line 588 of file modules.h.

virtual void Module::OnBotDelete ( BotInfo bi)
inlinevirtual

Called when a bot is deleted

Parameters
biThe bot

Reimplemented in MemoServCore, and ChanServCore.

Definition at line 598 of file modules.h.

virtual EventReturn Module::OnBotFantasy ( CommandSource source,
Command c,
ChannelInfo ci,
const std::vector< Anope::string > &  params 
)
inlinevirtual

Called on fantasy command

Parameters
sourceThe source of the command
cThe command
ciThe channel it's being used in
paramsThe params
Returns
EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed

Definition at line 400 of file modules.h.

Referenced by Fantasy::OnPrivmsg().

virtual void Module::OnBotInfo ( CommandSource source,
BotInfo bi,
ChannelInfo ci,
InfoFormatter info 
)
inlinevirtual

Called when a user uses botserv/info on a bot or channel.

Reimplemented in BSKick, BSAssign, Greet, and Fantasy.

Definition at line 825 of file modules.h.

virtual EventReturn Module::OnBotKick ( BotInfo bi,
Channel c,
User u,
const Anope::string reason 
)
inlinevirtual

Called before a bot kicks a user

Parameters
biThe bot sending the kick
cThe channel the user is being kicked on
uThe user being kicked
reasonThe reason
Returns
EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it

Definition at line 442 of file modules.h.

virtual EventReturn Module::OnBotNoFantasyAccess ( CommandSource source,
Command c,
ChannelInfo ci,
const std::vector< Anope::string > &  params 
)
inlinevirtual

Called on fantasy command without access

Parameters
sourceThe source of the command
cThe command
ciThe channel it's being used in
paramsThe params
Returns
EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed

Definition at line 409 of file modules.h.

Referenced by Fantasy::OnPrivmsg().

virtual void Module::OnBotNotice ( User u,
BotInfo bi,
Anope::string message 
)
inlinevirtual

Called when we receive a NOTICE for one of our clients

Parameters
uThe user sending the NOTICE
biThe target of the NOTICE
messageThe message

Reimplemented in IRC2SQL.

Definition at line 977 of file modules.h.

virtual EventReturn Module::OnBotPrivmsg ( User u,
BotInfo bi,
Anope::string message 
)
inlinevirtual

Called when we receive a PRIVMSG for one of our clients

Parameters
uThe user sending the PRIVMSG
biThe target of the PRIVMSG
messageThe message
Returns
EVENT_STOP to halt processing

Reimplemented in OSIgnore, OperServCore, and ChanServCore.

Definition at line 970 of file modules.h.

virtual EventReturn Module::OnBotUnAssign ( User sender,
ChannelInfo ci 
)
inlinevirtual

Called before a bot is unassigned from a channel.

Parameters
senderThe user unassigning the bot
ciThe channel the bot is being removed from
Returns
EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the unassign.

Definition at line 331 of file modules.h.

virtual EventReturn Module::OnCanSet ( User u,
const ChannelMode cm 
)
inlinevirtual

Called to determine if a chnanel mode can be set by a user

Parameters
uThe user
cmThe mode

Reimplemented in ChanServCore.

Definition at line 1063 of file modules.h.

virtual EventReturn Module::OnChanDrop ( CommandSource source,
ChannelInfo ci 
)
inlinevirtual

Called right before a channel is dropped

Parameters
sourceThe user dropping the channel
ciThe channel

Reimplemented in CSSuspend.

Definition at line 632 of file modules.h.

virtual void Module::OnChanExpire ( ChannelInfo ci)
inlinevirtual

Called before a channel expires

Parameters
ciThe channel

Definition at line 490 of file modules.h.

Referenced by ChanServCore::OnExpireTick().

virtual void Module::OnChangeCoreDisplay ( NickCore nc,
const Anope::string newdisplay 
)
inlinevirtual

Called on change_core_display()

Parameters
ncpointer to the NickCore
newdisplaythe new display

Reimplemented in MChanstats, and NickServCore.

Definition at line 779 of file modules.h.

virtual void Module::OnChanInfo ( CommandSource source,
ChannelInfo ci,
InfoFormatter info,
bool  show_hidden 
)
inlinevirtual

Called when a user requests info for a channel

Parameters
sourceThe user requesting info
ciThe channel the user is requesting info for
infoData to show the user requesting information
show_hiddentrue if we should show the user everything

Reimplemented in CSSet, CSMode, MChanstats, ChanServCore, OSInfo, CSList, CSTopic, CSSuspend, and CSSetMisc.

Definition at line 700 of file modules.h.

virtual void Module::OnChannelCreate ( Channel c)
inlinevirtual

Called when a new channel is created Note that this channel may not be introduced to the uplink at this point.

Parameters
cThe channel

Reimplemented in CSSet, and IRC2SQL.

Definition at line 663 of file modules.h.

virtual void Module::OnChannelDelete ( Channel c)
inlinevirtual

Called when a channel is deleted

Parameters
cThe channel

Reimplemented in IRC2SQL.

Definition at line 668 of file modules.h.

virtual void Module::OnChannelModeAdd ( ChannelMode cm)
inlinevirtual

Called when a channel mode is introducted into Anope

Parameters
cmThe mode

Reimplemented in OSDefcon.

Definition at line 921 of file modules.h.

virtual EventReturn Module::OnChannelModeSet ( Channel c,
MessageSource setter,
ChannelMode mode,
const Anope::string param 
)
inlinevirtual

Called when a mode is set on a channel

Parameters
cThe channel
setterThe user or server that is setting the mode
modeThe mode
paramThe mode param, if there is one
Returns
EVENT_STOP to make mlock/secureops etc checks not happen

Reimplemented in CSSet, MChanstats, ChanServCore, OSDefcon, BotServCore, IRC2SQL, and HelpChannel.

Definition at line 893 of file modules.h.

virtual EventReturn Module::OnChannelModeUnset ( Channel c,
MessageSource setter,
ChannelMode mode,
const Anope::string param 
)
inlinevirtual

Called when a mode is unset on a channel

Parameters
cThe channel
setterThe user or server that is unsetting the mode
modeThe mode
paramThe mode param, if there is one
Returns
EVENT_STOP to make mlock/secureops etc checks not happen

Reimplemented in CSSet, ProtoInspIRCd20, MChanstats, OSDefcon, and IRC2SQL.

Definition at line 902 of file modules.h.

virtual void Module::OnChannelSync ( Channel c)
inlinevirtual

Called when a channel is synced. Channels are synced after a sjoin is finished processing for a newly created channel to set the correct modes, topic, set.

Reimplemented in ProtoUnreal, CSSet, ProtoInspIRCd20, OSDefcon, ProtoCharybdis, ChanServCore, and CSTopic.

Definition at line 1016 of file modules.h.

virtual void Module::OnChanRegistered ( ChannelInfo ci)
inlinevirtual

Called when a channel is registered

Parameters
ciThe channel

Reimplemented in ProtoUnreal, CSMode, ProtoInspIRCd20, MChanstats, ChanServCore, CSLog, and BSAutoAssign.

Definition at line 637 of file modules.h.

virtual void Module::OnChanSuspend ( ChannelInfo ci)
inlinevirtual

Called when a channel is suspended

Parameters
ciThe channel

Definition at line 642 of file modules.h.

virtual void Module::OnChanUnsuspend ( ChannelInfo ci)
inlinevirtual

Called when a channel is unsuspended

Parameters
ciThe channel

Definition at line 647 of file modules.h.

virtual void Module::OnCheckAuthentication ( User u,
IdentifyRequest req 
)
inlinevirtual

Check whether a username and password is correct

Parameters
uThe user trying to identify, if applicable.
reqThe login request

Reimplemented in EBCRYPT, EMD5, ESHA256, NSIdentifyLDAP, ESHA1, ModuleSQLAuthentication, EOld, and ENone.

Definition at line 831 of file modules.h.

virtual EventReturn Module::OnCheckDelete ( Channel )
inlinevirtual

Reimplemented in CSSet, and ChanServCore.

Definition at line 1065 of file modules.h.

virtual EventReturn Module::OnCheckKick ( User u,
Channel c,
Anope::string mask,
Anope::string reason 
)
inlinevirtual

Called after a user join a channel when we decide whether to kick them or not

Parameters
uThe user
cThe channel
kickSet to true to kick
maskThe mask to ban, if any
reasonThe reason for the kick
Returns
EVENT_STOP to prevent the user from joining by kicking/banning the user

Reimplemented in CSSet, CSAKick, OSForbid, CSSuspend, and OperServCore.

Definition at line 692 of file modules.h.

virtual void Module::OnCheckModes ( Reference< Channel > &  c)
inlinevirtual

Called when a channels modes are being checked to see if they are allowed, mostly to ensure mlock/+r are set.

Parameters
cThe channel

Reimplemented in CSMode, and ChanServCore.

Definition at line 1009 of file modules.h.

virtual EventReturn Module::OnCheckPriv ( const ChanAccess access,
const Anope::string priv 
)
inlinevirtual

Checks if access has the channel privilege 'priv'.

Parameters
accessTHe access struct
privThe privilege being checked for
Returns
EVENT_ALLOW for yes, EVENT_STOP to stop all processing

Definition at line 707 of file modules.h.

virtual void Module::OnCreateBot ( BotInfo bi)
inlinevirtual

Called when a bot is created or destroyed

Reimplemented in BotServCore.

Definition at line 432 of file modules.h.

virtual void Module::OnCreateChan ( ChannelInfo ci)
inlinevirtual

Called when a channel is being created, for any reason

Parameters
ciThe channel

Reimplemented in CSSet, CSAccess, ChanServCore, BotServCore, and MemoServCore.

Definition at line 652 of file modules.h.

virtual EventReturn Module::OnDecrypt ( const Anope::string hashm,
const Anope::string src,
Anope::string dest 
)
inlinevirtual

Reimplemented in ENone.

Definition at line 391 of file modules.h.

virtual void Module::OnDefconLevel ( int  level)
inlinevirtual

Called when defcon level changes

Parameters
levelThe level

Definition at line 530 of file modules.h.

virtual void Module::OnDelBot ( BotInfo bi)
inlinevirtual

Definition at line 433 of file modules.h.

virtual void Module::OnDelChan ( ChannelInfo ci)
inlinevirtual

Called when a channel is being deleted, for any reason

Parameters
ciThe channel

Reimplemented in ProtoUnreal, CSSet, ProtoInspIRCd20, MChanstats, and ChanServCore.

Definition at line 657 of file modules.h.

virtual void Module::OnDelCore ( NickCore nc)
inlinevirtual

Called on delcore()

Parameters
ncpointer to the NickCore

Reimplemented in MChanstats, NickServCore, ChanServCore, and LDAPOper.

Definition at line 773 of file modules.h.

virtual void Module::OnDeleteVhost ( NickAlias na)
inlinevirtual

Called when a vhost is deleted

Parameters
naThe nickalias of the vhost

Reimplemented in HostServCore.

Definition at line 859 of file modules.h.

virtual void Module::OnDelNick ( NickAlias na)
inlinevirtual

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

Reimplemented in NickServCore.

Definition at line 763 of file modules.h.

virtual void Module::OnDelXLine ( CommandSource source,
const XLine x,
XLineManager xlm 
)
inlinevirtual

Called before a XLine is deleted

Parameters
sourceThe source of the XLine
xThe XLine
xlmThe xline manager it was deleted from

Definition at line 557 of file modules.h.

virtual void Module::OnDnsRequest ( DNS::Query req,
DNS::Query reply 
)
inlinevirtual

Called when a DNS request (question) is recieved.

Parameters
reqThe dns request
replyThe reply that will be sent

Reimplemented in ModuleDNS.

Definition at line 1003 of file modules.h.

virtual EventReturn Module::OnEncrypt ( const Anope::string src,
Anope::string dest 
)
inlinevirtual

Called when anope needs to check passwords against encryption see src/encrypt.c for detailed informations

Reimplemented in EBCRYPT, EMD5, ESHA256, ESHA1, EOld, and ENone.

Definition at line 390 of file modules.h.

virtual EventReturn Module::OnExceptionAdd ( Exception ex)
inlinevirtual

Called after an exception has been added

Parameters
exThe exception
Returns
EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it

Definition at line 536 of file modules.h.

virtual void Module::OnExceptionDel ( CommandSource source,
Exception ex 
)
inlinevirtual

Called before an exception is deleted

Parameters
sourceThe source deleting it
exThe exceotion

Definition at line 542 of file modules.h.

virtual void Module::OnExpireTick ( )
inlinevirtual

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

Reimplemented in OSSession, NickServCore, CSSeen, and ChanServCore.

Definition at line 1070 of file modules.h.

virtual void Module::OnFingerprint ( User u)
inlinevirtual

Called when we get informed about a users SSL fingerprint when we call this, the fingerprint should already be stored in the user struct

Parameters
upointer to the user

Reimplemented in NSCert, and IRC2SQL.

Definition at line 842 of file modules.h.

virtual EventReturn Module::OnGroupCheckPriv ( const AccessGroup group,
const Anope::string priv 
)
inlinevirtual

Check whether an access group has a privilege

Parameters
groupThe group
privThe privilege
Returns
MOD_ALLOW to allow, MOD_STOP to stop

Reimplemented in CSAccess.

Definition at line 714 of file modules.h.

virtual void Module::OnInvite ( User source,
Channel c,
User targ 
)
inlinevirtual

Called when a user invites one of our users to a channel

Parameters
sourceThe user doing the inviting
cThe channel the user is inviting to
targThe user being invited

Reimplemented in BSAssign.

Definition at line 854 of file modules.h.

virtual void Module::OnJoinChannel ( User u,
Channel c 
)
inlinevirtual

Called after a user joins a channel If this event triggers the user is allowed to be in the channel, and will not be kicked for restricted/akick/forbidden, etc. If you want to kick the user, use the CheckKick event instead.

Parameters
uThe user
channelThe channel

Reimplemented in CSSet, ChanServCore, CSSeen, CSEntryMessage, NSRecover, Greet, MemoServCore, IRC2SQL, and BotServCore.

Definition at line 472 of file modules.h.

virtual void Module::OnLeaveChannel ( User u,
Channel c 
)
inlinevirtual

Called when a user leaves a channel. From either parting, being kicked, or quitting/killed!

Parameters
uThe user
cThe channel

Reimplemented in BotServCore, and IRC2SQL.

Definition at line 463 of file modules.h.

virtual void Module::OnLevelChange ( CommandSource source,
ChannelInfo ci,
const Anope::string priv,
int16_t  what 
)
inlinevirtual

Called when a level for a channel is changed

Parameters
sourceThe source of the command
ciThe channel the level was changed on
privThe privilege changed
whatThe new level

Definition at line 626 of file modules.h.

virtual EventReturn Module::OnLoadDatabase ( )
inlinevirtual

Called when the databases are loaded

Returns
EVENT_CONTINUE to let other modules continue loading, EVENT_STOP to stop

Reimplemented in DBOld, DBFlatFile, DatabaseRedis, DBSQL, and DBMySQL.

Definition at line 385 of file modules.h.

virtual void Module::OnLog ( Log l)
inlinevirtual

Called when a message is logged

Parameters
lThe log message

Reimplemented in CSLog, ChanServCore, and OperServCore.

Definition at line 989 of file modules.h.

virtual void Module::OnLogMessage ( LogInfo li,
const Log l,
const Anope::string msg 
)
inlinevirtual

Called when a log message is actually logged to a given log info The message has already passed validation checks by the LogInfo

Parameters
liThe loginfo whee the message is being logged
lThe log message
msgThe final formatted message, derived from 'l'

Reimplemented in SQLLog.

Definition at line 997 of file modules.h.

virtual void Module::OnMemoDel ( const Anope::string target,
MemoInfo mi,
const Memo m 
)
inlinevirtual

Called when a memo is deleted

Parameters
targetThe target the memo is being deleted from (nick or channel)
miThe memo info
mThe memo

Definition at line 884 of file modules.h.

virtual void Module::OnMemoSend ( const Anope::string source,
const Anope::string target,
MemoInfo mi,
Memo m 
)
inlinevirtual

Called when a memo is sent

Parameters
sourceThe source of the memo
targetThe target of the memo
miMemo info for target
mThe memo

Definition at line 877 of file modules.h.

Referenced by MemoServCore::Send().

virtual EventReturn Module::OnMessage ( MessageSource source,
Anope::string command,
std::vector< Anope::string > &  param 
)
inlinevirtual

Called whenever a message is received from the uplink

Parameters
sourceThe source of the message
commandThe command being executed
paramsParameters
Returns
EVENT_STOP to prevent the protocol module from processing this message

Definition at line 1057 of file modules.h.

virtual EventReturn Module::OnMLock ( ChannelInfo ci,
ModeLock lock 
)
inlinevirtual

Called when a mode is about to be mlocked

Parameters
ciThe channel the mode is being locked on
lockThe mode lock
Returns
EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.

Reimplemented in ProtoUnreal, ProtoInspIRCd20, and ProtoCharybdis.

Definition at line 933 of file modules.h.

virtual void Module::OnModuleLoad ( User u,
Module m 
)
inlinevirtual

Called after a module is loaded

Parameters
uThe user loading the module, can be NULL
mThe module

Reimplemented in HTTPD.

Definition at line 946 of file modules.h.

virtual void Module::OnModuleUnload ( User u,
Module m 
)
inlinevirtual

Called before a module is unloaded

Parameters
uThe user, can be NULL
mThe module

Reimplemented in ModuleDNS, ModuleRedis, ModuleLDAP, and ModuleSQL.

Definition at line 952 of file modules.h.

virtual void Module::OnNewServer ( Server s)
inlinevirtual

Called when a new server connects to the network.

Parameters
sThe server that has connected to the network

Reimplemented in ModuleDNS, GlobalCore, and IRC2SQL.

Definition at line 342 of file modules.h.

virtual void Module::OnNickAddAccess ( NickCore nc,
const Anope::string entry 
)
inlinevirtual

Called when a user adds an entry to their access list

Parameters
ncThe nick
entryThe entry

Definition at line 790 of file modules.h.

virtual void Module::OnNickAddCert ( NickCore nc,
const Anope::string entry 
)
inlinevirtual

Called when a user adds an entry to their cert list

Parameters
ncThe nick
entryThe entry

Definition at line 807 of file modules.h.

virtual void Module::OnNickClearAccess ( NickCore nc)
inlinevirtual

called from NickCore::ClearAccess()

Parameters
ncpointer to the NickCore

Definition at line 784 of file modules.h.

virtual void Module::OnNickClearCert ( NickCore nc)
inlinevirtual

called from NickCore::ClearCert()

Parameters
ncpointer to the NickCore

Definition at line 801 of file modules.h.

virtual void Module::OnNickCoreCreate ( NickCore nc)
inlinevirtual

Called when a nickcore is created

Parameters
ncThe nickcore

Reimplemented in NickServCore, and MemoServCore.

Definition at line 768 of file modules.h.

virtual void Module::OnNickDrop ( CommandSource source,
NickAlias na 
)
inlinevirtual

Called when a nick is dropped

Parameters
sourceThe source of the command
naThe nick

Definition at line 720 of file modules.h.

virtual void Module::OnNickEraseAccess ( NickCore nc,
const Anope::string entry 
)
inlinevirtual

Called from NickCore::EraseAccess()

Parameters
ncpointer to the NickCore
entryThe access mask

Definition at line 796 of file modules.h.

virtual void Module::OnNickEraseCert ( NickCore nc,
const Anope::string entry 
)
inlinevirtual

Called from NickCore::EraseCert()

Parameters
ncpointer to the NickCore
entryThe fingerprint

Definition at line 813 of file modules.h.

virtual void Module::OnNickExpire ( NickAlias na)
inlinevirtual

Called when a nick drops

Parameters
naThe nick

Definition at line 525 of file modules.h.

Referenced by NickServCore::OnExpireTick().

virtual void Module::OnNickGroup ( User u,
NickAlias target 
)
inlinevirtual

Called when a user groups their nick

Parameters
uThe user grouping
targetThe target they're grouping to

Reimplemented in NickServCore, and HSGroup.

Definition at line 726 of file modules.h.

virtual void Module::OnNickIdentify ( User u)
inlinevirtual

Called when a user identifies to a nick

Parameters
uThe user

Reimplemented in NSRegister, NickServCore, NSIdentifyLDAP, MemoServCore, ModuleSQLOper, and LDAPOper.

Definition at line 731 of file modules.h.

virtual void Module::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 in NSSet, NickServCore, MChanstats, NSList, OSInfo, NSSuspend, NSSetMisc, and Greet.

Definition at line 821 of file modules.h.

virtual void Module::OnNickLogout ( User u)
inlinevirtual

Called when a nick logs out

Parameters
uThe nick

Reimplemented in IRC2SQL.

Definition at line 741 of file modules.h.

Referenced by NickServCore::OnDelCore().

virtual void Module::OnNickRegister ( User user,
NickAlias na,
const Anope::string pass 
)
inlinevirtual

Called when a nick is registered

Parameters
userThe user registering the nick, of any
Thenick
passThe password of the newly registered nick

Reimplemented in MChanstats, NSIdentifyLDAP, and NSAccess.

Definition at line 748 of file modules.h.

virtual void Module::OnNickSuspend ( NickAlias na)
inlinevirtual

Called when a nick is suspended

Parameters
naThe nick alias

Definition at line 753 of file modules.h.

virtual void Module::OnNickUnsuspended ( NickAlias na)
inlinevirtual

Called when a nick is unsuspneded

Parameters
naThe nick alias

Definition at line 758 of file modules.h.

virtual void Module::OnNickUpdate ( User u)
inlinevirtual

Called when a user does /ns update

Parameters
uThe user

Reimplemented in NickServCore, MemoServCore, and HostServCore.

Definition at line 836 of file modules.h.

virtual EventReturn Module::OnNickValidate ( User u,
NickAlias na 
)
inlinevirtual

Called when a nick is validated. That is, to determine if a user is permissted to be on the given nick.

Parameters
uThe user
naThe nick they are on
Returns
EVENT_STOP to force the user off of the nick

Reimplemented in NSCert, and NSSuspend.

Definition at line 1078 of file modules.h.

Referenced by NickServCore::Validate().

virtual void Module::OnPartChannel ( User u,
Channel c,
const Anope::string channel,
const Anope::string msg 
)
inlinevirtual

Called when a user parts a channel

Parameters
uThe user
cThe channel, may be NULL if the channel no longer exists
channelThe channel name
msgThe part reason

Reimplemented in CSSeen.

Definition at line 456 of file modules.h.

virtual void Module::OnPostCommand ( CommandSource source,
Command command,
const std::vector< Anope::string > &  params 
)
inlinevirtual

Called after a command has been executed.

Parameters
sourceThe source of the command
commandThe command the user executed
paramsThe parameters the user sent

Definition at line 376 of file modules.h.

Referenced by Fantasy::OnPrivmsg().

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

Called when someone uses the generic/help command

Parameters
sourceCommand source
paramsParams

Reimplemented in NickServCore, ChanServCore, MemoServCore, and BotServCore.

Definition at line 361 of file modules.h.

virtual void Module::OnPostUserLogoff ( User u)
inlinevirtual

Reimplemented in NickServCore.

Definition at line 583 of file modules.h.

virtual EventReturn Module::OnPreBotAssign ( User sender,
ChannelInfo ci,
BotInfo bi 
)
inlinevirtual

Called before a bot is assigned to a channel.

Parameters
senderThe user assigning the bot
ciThe channel the bot is to be assigned to.
biThe bot being assigned.
Returns
EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the assign.

Definition at line 320 of file modules.h.

virtual void Module::OnPreChanExpire ( ChannelInfo ci,
bool &  expire 
)
inlinevirtual

Called before a channel expires

Parameters
ciThe channel
expireSet to true to allow the chan to expire

Reimplemented in CSSet, and CSSuspend.

Definition at line 485 of file modules.h.

Referenced by ChanServCore::OnExpireTick().

virtual EventReturn Module::OnPreCommand ( CommandSource source,
Command command,
std::vector< Anope::string > &  params 
)
inlinevirtual

Called before a command is due to be executed.

Parameters
sourceThe source of the command
commandThe command the user is executing
paramsThe parameters the user is sending
Returns
EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it

Reimplemented in NSSet, OSForbid, OSDefcon, NSIdentifyLDAP, ModuleSQLAuthentication, NSResetPass, and NSMaxEmail.

Definition at line 369 of file modules.h.

Referenced by Fantasy::OnPrivmsg().

virtual EventReturn Module::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 in NickServCore, OperServCore, ChanServCore, MemoServCore, BotServCore, GlobalCore, and HostServCore.

Definition at line 355 of file modules.h.

virtual void Module::OnPreNickExpire ( NickAlias na,
bool &  expire 
)
inlinevirtual

Called before a nick expires

Parameters
naThe nick
expireSet to true to allow the nick to expire

Reimplemented in NSSet, NSRegister, and NSSuspend.

Definition at line 520 of file modules.h.

Referenced by NickServCore::OnExpireTick().

virtual void Module::OnPrePartChannel ( User u,
Channel c 
)
inlinevirtual

Called before a user parts a channel

Parameters
uThe user
cThe channel

Definition at line 448 of file modules.h.

virtual void Module::OnPreServerConnect ( )
inlinevirtual

Called before Anope connecs to its uplink

Reimplemented in GnuTLSModule, and SSLModule.

Definition at line 494 of file modules.h.

virtual void Module::OnPreUplinkSync ( Server serv)
inlinevirtual

Called when we are almost done synching with the uplink, just before we send the EOB

Reimplemented in ChanServCore.

Definition at line 502 of file modules.h.

virtual void Module::OnPreUserKicked ( const MessageSource source,
ChanUserContainer cu,
const Anope::string kickmsg 
)
inlinevirtual

Called before a user has been kicked from a channel.

Parameters
sourceThe kicker
cuThe user, channel, and status of the user being kicked
kickmsgThe reason for the kick.

Reimplemented in MChanstats, and CSSeen.

Definition at line 297 of file modules.h.

virtual void Module::OnPreUserLogoff ( User u)
inlinevirtual

Called when a user is quit, before and after being internally removed from This is different from OnUserQuit, which takes place at the time of the quit. This happens shortly after when all message processing is finished. all lists (channels, user list, etc)

Parameters
uThe user

Reimplemented in ModuleDNS.

Definition at line 582 of file modules.h.

virtual void Module::OnPrivmsg ( User u,
Channel c,
Anope::string msg 
)
inlinevirtual

Called when we receive a PRIVMSG for a registered channel we are in

Parameters
uThe source of the message
cThe channel
msgThe message

Reimplemented in BSKick, MChanstats, and Fantasy.

Definition at line 984 of file modules.h.

virtual void Module::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 in ProtoUnreal, CSSet, ModuleDNS, EBCRYPT, CSMode, ProtoInspIRCd20, CSAccess, ModuleDNS, OSSession, CSXOP, ModuleRedis, MChanstats, ModuleLDAP, CSFlags, OSNews, CSSeen, ProtoCharybdis, HTTPD, OSDefcon, GnuTLSModule, CSLog, NickServCore, ModuleProxyScan, NSSuspend, NSIdentifyLDAP, OperServCore, NSSetMisc, ModuleSQL, CSSetMisc, ModuleXMLRPC, DatabaseRedis, ModuleRewrite, DBSQL, MemoServCore, DBMySQL, SSLModule, ModuleSQLOper, HSGroup, CSTop, ModuleDNSBL, LDAPOper, ChanServCore, ModuleSQLAuthentication, ModuleSQLite, CSStats, IRC2SQL, GlobalCore, BotServCore, HostServCore, and SQLLog.

Definition at line 312 of file modules.h.

Referenced by ModuleManager::LoadModule().

virtual void Module::OnRestart ( )
inlinevirtual

Called when services restart

Reimplemented in DBFlatFile, DBSQL, NickServCore, DBMySQL, and GlobalCore.

Definition at line 510 of file modules.h.

virtual void Module::OnSaveDatabase ( )
inlinevirtual

Called when the databases are saved

Reimplemented in DBFlatFile.

Definition at line 380 of file modules.h.

virtual void Module::OnSerializableConstruct ( Serializable )
inlinevirtual

Reimplemented in DatabaseRedis, DBSQL, and DBMySQL.

Definition at line 1028 of file modules.h.

virtual void Module::OnSerializableDestruct ( Serializable )
inlinevirtual

Reimplemented in DatabaseRedis, DBSQL, and DBMySQL.

Definition at line 1029 of file modules.h.

virtual void Module::OnSerializableUpdate ( Serializable )
inlinevirtual

Reimplemented in DBMySQL, DatabaseRedis, and DBSQL.

Definition at line 1030 of file modules.h.

virtual void Module::OnSerializeCheck ( Serialize::Type )
inlinevirtual

Reimplemented in DBMySQL.

Definition at line 1027 of file modules.h.

virtual void Module::OnSerializeTypeCreate ( Serialize::Type )
inlinevirtual

Reimplemented in DBFlatFile, DBSQL, and DatabaseRedis.

Definition at line 1031 of file modules.h.

virtual void Module::OnServerConnect ( )
inlinevirtual

Called when Anope connects to its uplink

Definition at line 498 of file modules.h.

virtual void Module::OnServerDisconnect ( )
inlinevirtual

Called when Anope disconnects from its uplink, before it tries to reconnect

Definition at line 506 of file modules.h.

virtual void Module::OnServerQuit ( Server server)
inlinevirtual

Called when a server quits

Parameters
serverThe server

Reimplemented in ModuleDNS, OperServCore, and IRC2SQL.

Definition at line 568 of file modules.h.

virtual void Module::OnServerSync ( Server s)
inlinevirtual

Called when a server is synced

Parameters
sThe server, can be our uplink server

Reimplemented in NickServCore.

Definition at line 957 of file modules.h.

virtual EventReturn Module::OnSetChannelOption ( CommandSource source,
Command cmd,
ChannelInfo ci,
const Anope::string setting 
)
inlinevirtual

Called when a chanserv/set command is used

Parameters
sourceThe source of the command
cmdThe command
ciThe channel the command was used on
settingThe setting passed to the command. Probably ON/OFF.
Returns
EVENT_ALLOW to bypass access checks, EVENT_STOP to halt immediately.

Reimplemented in ProtoInspIRCd20.

Definition at line 1040 of file modules.h.

virtual void Module::OnSetCorrectModes ( User user,
Channel chan,
AccessGroup access,
bool &  give_modes,
bool &  take_modes 
)
inlinevirtual

Called to set the correct modes on the user on the given channel

Parameters
userThe user
chanThe channel
accessThe user's access on the channel
give_modesIf giving modes is desired
take_modesIf taking modes is desired

Reimplemented in CSSet, NSSet, ChanServCore, and BotServCore.

Definition at line 1025 of file modules.h.

virtual void Module::OnSetDisplayedHost ( User )
inlinevirtual

Called when a users host changes

Parameters
uThe user

Reimplemented in IRC2SQL.

Definition at line 869 of file modules.h.

virtual EventReturn Module::OnSetNickOption ( CommandSource source,
Command cmd,
NickCore nc,
const Anope::string setting 
)
inlinevirtual

Called when a nickserv/set command is used.

Parameters
sourceThe source of the command
cmdThe command
ncThe nickcore being modifed
settingThe setting passed to the command. Probably ON/OFF.
Returns
EVENT_STOP to halt immediately

Definition at line 1049 of file modules.h.

virtual void Module::OnSetVhost ( NickAlias na)
inlinevirtual

Called when a vhost is set

Parameters
naThe nickalias of the vhost

Reimplemented in HSGroup, and HostServCore.

Definition at line 864 of file modules.h.

virtual void Module::OnShutdown ( )
inlinevirtual

Called when services shutdown

Reimplemented in DBFlatFile, DBSQL, NickServCore, DBMySQL, GlobalCore, and IRC2SQL.

Definition at line 514 of file modules.h.

virtual void Module::OnTopicUpdated ( Channel c,
const Anope::string user,
const Anope::string topic 
)
inlinevirtual

Called when a new topic is set

Parameters
cThe channel
setterThe user who set the new topic
topicThe new topic

Reimplemented in MChanstats, CSTopic, and IRC2SQL.

Definition at line 479 of file modules.h.

virtual EventReturn Module::OnUnMLock ( ChannelInfo ci,
ModeLock lock 
)
inlinevirtual

Called when a mode is about to be unlocked

Parameters
ciThe channel the mode is being unlocked from
lockThe mode lock
Returns
EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.

Reimplemented in ProtoUnreal, ProtoInspIRCd20, and ProtoCharybdis.

Definition at line 940 of file modules.h.

virtual void Module::OnUplinkSync ( Server s)
inlinevirtual

Called when we sync with our uplink

Parameters
sOur uplink

Reimplemented in DBOld.

Definition at line 962 of file modules.h.

virtual void Module::OnUserAway ( User u,
const Anope::string message 
)
inlinevirtual

Called when a user becomes (un)away

Parameters
messageThe message, is .empty() if unaway

Reimplemented in MemoServCore.

Definition at line 847 of file modules.h.

virtual void Module::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 in ModuleDNS, OSSession, OSDefcon, OSNews, OSForbid, CSSeen, NickServCore, ModuleProxyScan, OSStats, OperServCore, ModuleDNSBL, and IRC2SQL.

Definition at line 337 of file modules.h.

virtual void Module::OnUserKicked ( const MessageSource source,
User target,
const Anope::string channel,
ChannelStatus status,
const Anope::string kickmsg 
)
inlinevirtual

Called when a user has been kicked from a channel.

Parameters
sourceThe kicker
targetThe user being kicked
channelThe channel the user was kicked from, which may no longer exist
statusThe status the kicked user had on the channel before they were kicked
kickmsgThe reason for the kick.

Reimplemented in BotServCore.

Definition at line 306 of file modules.h.

virtual void Module::OnUserLogin ( User u)
inlinevirtual

Called when a user is logged into an account

Parameters
uThe user

Reimplemented in NSSet, NSAJoin, NickServCore, IRC2SQL, and HostServCore.

Definition at line 736 of file modules.h.

virtual void Module::OnUserModeAdd ( UserMode um)
inlinevirtual

Called when a user mode is introducted into Anope

Parameters
umThe mode

Definition at line 926 of file modules.h.

virtual void Module::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 in NSSet, OSNews, NickServCore, OperServCore, OSNOOP, and IRC2SQL.

Definition at line 909 of file modules.h.

virtual void Module::OnUserModeUnset ( const MessageSource setter,
User u,
const Anope::string mname 
)
inlinevirtual

Called when a mode is unset from a user

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

Reimplemented in NSSet, OperServCore, and IRC2SQL.

Definition at line 916 of file modules.h.

virtual void Module::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 in ProtoInspIRCd12, ProtoUnreal, ProtoInspIRCd20, ProtongIRCd, ProtoHybrid, ProtoBahamut, OSForbid, CSSeen, NickServCore, OperServCore, NSRecover, and IRC2SQL.

Definition at line 348 of file modules.h.

Referenced by CommandOSForbid::Execute().

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

Called when a user quits, or is killed

Parameters
uThe user
msgThe quit message

Reimplemented in OSSession, NickServCore, CSSeen, and IRC2SQL.

Definition at line 574 of file modules.h.

void Module::SetAuthor ( const Anope::string author)

Set the modules author info

Parameters
authorthe author of the module

Definition at line 99 of file module.cpp.

References author.

Referenced by Module().

void Module::SetPermanent ( bool  state)

Toggles the permanent flag on a module. If a module is permanent, then it may not be unloaded.

Naturally, this setting should be used sparingly!

Parameters
stateTrue if this module should be permanent, false else.

Definition at line 84 of file module.cpp.

References permanent.

Referenced by CSAccess::CSAccess(), CSFlags::CSFlags(), CSXOP::CSXOP(), ModuleRegexPCRE::ModuleRegexPCRE(), ModuleRegexPOSIX::ModuleRegexPOSIX(), ModuleRegexTRE::ModuleRegexTRE(), OSModule::OSModule(), and OSSession::OSSession().

void Module::SetVersion ( const Anope::string version)

Set the modules version info.

Parameters
versionthe version of the module

Definition at line 94 of file module.cpp.

References version.

Referenced by Module().

Field Documentation

Anope::string Module::author

Author of the module

Definition at line 245 of file modules.h.

Referenced by CommandOSModInfo::Execute(), and SetAuthor().

time_t Module::created

Time this module was created

Definition at line 237 of file modules.h.

Referenced by CommandOSModInfo::Execute(), CSSet::Persist::ExtensibleUnserialize(), and Module().

Anope::string Module::filename

The temporary path/filename

Definition at line 229 of file modules.h.

Referenced by ModuleManager::DeleteModule(), and ModuleManager::LoadModule().

void* Module::handle
Anope::string Module::name
bool Module::permanent
private

Definition at line 217 of file modules.h.

Referenced by GetPermanent(), Module(), and SetPermanent().

ModType Module::type
Anope::string Module::version

Version of this module

Definition at line 241 of file modules.h.

Referenced by CommandOSModInfo::Execute(), CommandOSModList::Execute(), and SetVersion().


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