#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, DBFlatFile, DBMySQL, DBOld, DBPlain, DBSQL, EMD5, ENone, EOld, ESHA1, ESHA256, GLGlobal, GlobalCore, Help, HelpChannel, HostServCore, HSDel, HSGroup, HSList, HSOff, HSOn, HSRequest, HSSet, HTTPD, LDAPOper, MChanstats, MemoServCore, ModuleDNS, ModuleDNS, ModuleDNSBL, ModuleLDAP, ModuleProxyScan, ModuleRegexPCRE, ModuleRegexPOSIX, ModuleRegexTRE, ModuleRewrite, 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, OSJupe, OSKick, OSKill, OSList, OSLogin, OSLogSearch, OSMode, OSModInfo, OSModule, OSNews, OSNOOP, OSOLine, OSOper, OSReload, OSSession, OSSet, OSShutdown, OSStats, OSSVS, OSSXLine, OSUpdate, ProtoBahamut, ProtoHybrid, ProtoInspIRCd, ProtoInspIRCd, ProtoInspIRCd, ProtongIRCd, ProtoPlexus, ProtoRatbox, ProtoUnreal, SSLModule, and StatusUpdate.
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 | OnUserKicked (Channel *c, User *target, MessageSource &source, const Anope::string &kickmsg) |
| virtual void | OnReload () |
| virtual EventReturn | 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 > ¶ms) |
| virtual void | OnPostHelp (CommandSource &source, const std::vector< Anope::string > ¶ms) |
| virtual EventReturn | OnPreCommand (CommandSource &source, Command *command, std::vector< Anope::string > ¶ms) |
| virtual void | OnPostCommand (CommandSource &source, Command *command, const std::vector< Anope::string > ¶ms) |
| virtual EventReturn | 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 > ¶ms) |
| virtual EventReturn | OnBotNoFantasyAccess (CommandSource &source, Command *c, ChannelInfo *ci, const std::vector< Anope::string > ¶ms) |
| virtual void | OnBotJoin (Channel *c, BotInfo *bi) |
| 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 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 EventReturn | OnPreJoinChannel (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 void | OnChanDrop (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, ChannelInfo *ci, Anope::string &mask, Anope::string &reason) |
| virtual void | OnChanInfo (CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden) |
| virtual EventReturn | OnCheckPriv (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 | OnNickForbidden (NickAlias *na) |
| virtual void | OnNickGroup (User *u, NickAlias *target) |
| virtual void | OnNickIdentify (User *u) |
| virtual void | OnNickLogout (User *u) |
| virtual void | OnNickRegister (NickAlias *na) |
| virtual void | OnNickSuspend (NickAlias *na) |
| virtual void | OnNickUnsuspended (NickAlias *na) |
| virtual void | OnDelNick (NickAlias *na) |
| 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 | 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 | OnDeleteVhost (NickAlias *na) |
| virtual void | OnSetVhost (NickAlias *na) |
| virtual void | OnMemoSend (const Anope::string &source, const Anope::string &target, MemoInfo *mi, Memo *m) |
| virtual void | OnMemoDel (NickCore *nc, MemoInfo *mi, const Memo *m) |
| virtual void | OnMemoDel (ChannelInfo *ci, MemoInfo *mi, const Memo *m) |
| virtual EventReturn | OnChannelModeSet (Channel *c, MessageSource &setter, const Anope::string &mname, const Anope::string ¶m) |
| virtual EventReturn | OnChannelModeUnset (Channel *c, MessageSource &setter, const Anope::string &mname, const Anope::string ¶m) |
| virtual void | OnUserModeSet (User *u, const Anope::string &mname) |
| virtual void | OnUserModeUnset (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 | OnPrivmsg (User *u, Channel *c, Anope::string &msg) |
| virtual void | OnLog (Log *l) |
| virtual void | OnDnsRequest (DNS::Packet &req, DNS::Packet *reply) |
| virtual EventReturn | OnCheckModes (Channel *c) |
| 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 > ¶m) |
Data Fields |
| Anope::string | name |
| ModType | type |
| Anope::string | filename |
| std::list< CallBack * > | callbacks |
| void * | handle |
| time_t | created |
| Anope::string | version |
| Anope::string | author |
Private Attributes |
| bool | permanent |
Detailed Description
Every module in Anope is actually a class.
Definition at line 181 of file modules.h.
Constructor & Destructor Documentation
Creates and initialises a new module.
- Parameters:
-
| modname | The module name |
| loadernick | The nickname of the user loading the module. |
| type | The module type |
Definition at line 19 of file module.cpp.
References Anope::string::c_str(), created, Anope::CurTime, Language::Domains, ModuleManager::FindModule(), handle, Anope::IsFile(), Language::Languages, Anope::LastError(), Anope::LocaleDir, ModuleManager::Modules, name, Anope::NoThird, permanent, SetVersion(), THIRD, and Anope::Version().
| Module::~Module |
( |
|
) |
[virtual] |
Member Function Documentation
| bool Module::GetPermanent |
( |
|
) |
const |
Called when a user is checked for whether they are a services oper
- Parameters:
-
- Returns:
- EVENT_ALLOW to allow, anything else to deny
Reimplemented in OSLogin.
Definition at line 526 of file modules.h.
Called when access is added
- Parameters:
-
| ci | The channel |
| source | The source of the command |
| access | The access changed |
Reimplemented in StatusUpdate.
Definition at line 573 of file modules.h.
Called when the access list is cleared
- Parameters:
-
| ci | The channel |
| u | The user who cleared the access |
Definition at line 579 of file modules.h.
Called when access is deleted from a channel
- Parameters:
-
| ci | The channel |
| source | The source of the command |
| access | The access entry being removed |
Reimplemented in StatusUpdate.
Definition at line 566 of file modules.h.
Called before a XLine is added
- Parameters:
-
| source | The source of the XLine |
| x | The XLine |
| xlm | The 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 513 of file modules.h.
Called after adding an akick to a channel
- Parameters:
-
| source | The source of the command |
| ci | The channel |
| ak | The akick |
Definition at line 634 of file modules.h.
Called before removing an akick from a channel
- Parameters:
-
| source | The source of the command |
| ci | The channel |
| ak | The akick |
Definition at line 641 of file modules.h.
| virtual void Module::OnBadWordAdd |
( |
ChannelInfo * |
ci, |
|
|
const BadWord * |
bw | |
|
) |
| | [inline, virtual] |
Called before a badword is added to the badword list
- Parameters:
-
| ci | The channel |
| bw | The badword |
Definition at line 386 of file modules.h.
| virtual void Module::OnBadWordDel |
( |
ChannelInfo * |
ci, |
|
|
const BadWord * |
bw | |
|
) |
| | [inline, virtual] |
Called before a badword is deleted from a channel
- Parameters:
-
| ci | The channel |
| bw | The badword |
Definition at line 392 of file modules.h.
Called before a bot is assigned to a channel.
- Parameters:
-
| sender | The user assigning the bot |
| ci | The channel the bot is to be assigned to. |
| bi | The bot being assigned. |
- Returns:
- EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the assign.
Definition at line 281 of file modules.h.
| virtual void Module::OnBotChange |
( |
BotInfo * |
bi |
) |
[inline, virtual] |
Called when a bot is changed
- Parameters:
-
Definition at line 554 of file modules.h.
| virtual void Module::OnBotCreate |
( |
BotInfo * |
bi |
) |
[inline, virtual] |
Called when a new bot is made
- Parameters:
-
Definition at line 549 of file modules.h.
| virtual void Module::OnBotDelete |
( |
BotInfo * |
bi |
) |
[inline, virtual] |
Called on fantasy command
- Parameters:
-
| source | The source of the command |
| c | The command |
| ci | The channel it's being used in |
| params | The params |
- Returns:
- EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed
Definition at line 358 of file modules.h.
Referenced by BotServCore::OnPrivmsg().
| virtual void Module::OnBotJoin |
( |
Channel * |
c, |
|
|
BotInfo * |
bi | |
|
) |
| | [inline, virtual] |
Called after a bot joins a channel
- Parameters:
-
Definition at line 373 of file modules.h.
Called before a bot kicks a user
- Parameters:
-
| bi | The bot sending the kick |
| c | The channel the user is being kicked on |
| u | The user being kicked |
| reason | The reason |
- Returns:
- EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
Definition at line 401 of file modules.h.
Called on fantasy command without access
- Parameters:
-
| source | The source of the command |
| c | The command |
| ci | The channel it's being used in |
| params | The params |
- Returns:
- EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed
Definition at line 367 of file modules.h.
Referenced by BotServCore::OnPrivmsg().
Called when we receive a PRIVMSG for one of our clients
- Parameters:
-
| u | The user sending the PRIVMSG |
| bi | The target of the PRIVMSG |
| message | The message |
- Returns:
- EVENT_STOP to halt processing
Reimplemented in OSIgnore, ChanServCore, and OperServCore.
Definition at line 911 of file modules.h.
Called before a bot is unassigned from a channel.
- Parameters:
-
| sender | The user unassigning the bot |
| ci | The channel the bot is being removed from |
- Returns:
- EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the unassign.
Definition at line 288 of file modules.h.
| virtual void Module::OnChanDrop |
( |
ChannelInfo * |
ci |
) |
[inline, virtual] |
Called right before a channel is dropped
- Parameters:
-
Reimplemented in MChanstats.
Definition at line 592 of file modules.h.
| virtual void Module::OnChanExpire |
( |
ChannelInfo * |
ci |
) |
[inline, virtual] |
Called before a channel expires
- Parameters:
-
Definition at line 453 of file modules.h.
| virtual void Module::OnChangeCoreDisplay |
( |
NickCore * |
nc, |
|
|
const Anope::string & |
newdisplay | |
|
) |
| | [inline, virtual] |
Called when a user requests info for a channel
- Parameters:
-
| source | The user requesting info |
| ci | The channel the user is requesting info for |
| info | Data to show the user requesting information |
| show_hidden | true if we should show the user everything |
Reimplemented in CSSetMisc.
Definition at line 659 of file modules.h.
| virtual void Module::OnChannelCreate |
( |
Channel * |
c |
) |
[inline, virtual] |
| virtual void Module::OnChannelDelete |
( |
Channel * |
c |
) |
[inline, virtual] |
Called when a channel is deleted
- Parameters:
-
Definition at line 627 of file modules.h.
| virtual void Module::OnChannelModeAdd |
( |
ChannelMode * |
cm |
) |
[inline, virtual] |
Called when a channel mode is introducted into Anope
- Parameters:
-
Reimplemented in OSDefcon.
Definition at line 862 of file modules.h.
Called when a mode is set on a channel
- Parameters:
-
| c | The channel |
| setter | The user or server that is setting the mode |
| mname | The mode name |
| param | The mode param, if there is one |
- Returns:
- EVENT_STOP to make mlock/secureops etc checks not happen
Reimplemented in OSDefcon, MChanstats, HelpChannel, and BotServCore.
Definition at line 836 of file modules.h.
Called when a mode is unset on a channel
- Parameters:
-
| c | The channel |
| setter | The user or server that is unsetting the mode |
| mname | The mode name |
| param | The mode param, if there is one |
- Returns:
- EVENT_STOP to make mlock/secureops etc checks not happen
Reimplemented in OSDefcon, and MChanstats.
Definition at line 845 of file modules.h.
| virtual void Module::OnChanRegistered |
( |
ChannelInfo * |
ci |
) |
[inline, virtual] |
| virtual void Module::OnChanSuspend |
( |
ChannelInfo * |
ci |
) |
[inline, virtual] |
Called when a channel is suspended
- Parameters:
-
Definition at line 602 of file modules.h.
| virtual void Module::OnChanUnsuspend |
( |
ChannelInfo * |
ci |
) |
[inline, virtual] |
Called when a channel is unsuspended
- Parameters:
-
Definition at line 607 of file modules.h.
| virtual void Module::OnCheckAuthentication |
( |
User * |
u, |
|
|
IdentifyRequest * |
req | |
|
) |
| | [inline, virtual] |
Called after a user join a channel when we decide whether to kick them or not
- Parameters:
-
| u | The user |
| ci | The channel |
| kick | Set to true to kick |
| mask | The mask to ban, if any |
| reason | The reason for the kick |
- Returns:
- EVENT_STOP to prevent the user from joining by kicking/banning the user
Reimplemented in CSAKick, CSSet, CSSuspend, and OperServCore.
Definition at line 651 of file modules.h.
Called when a channels modes are being checked to see if they are allowed, mostly to ensure mlock/+r are set.
- Parameters:
-
- Returns:
- EVENT_STOP to stop checking modes
Reimplemented in ChanServCore.
Definition at line 936 of file modules.h.
Checks if access has the channel privilege 'priv'.
- Parameters:
-
| access | THe access struct |
| priv | The privilege being checked for |
- Returns:
- EVENT_ALLOW for yes, EVENT_STOP to stop all processing
Definition at line 666 of file modules.h.
| virtual void Module::OnCreateChan |
( |
ChannelInfo * |
ci |
) |
[inline, virtual] |
Called when a channel is being created, for any reason
- Parameters:
-
Reimplemented in CSAccess.
Definition at line 612 of file modules.h.
| virtual void Module::OnDefconLevel |
( |
int |
level |
) |
[inline, virtual] |
Called when defcon level changes
- Parameters:
-
Definition at line 493 of file modules.h.
| virtual void Module::OnDelChan |
( |
ChannelInfo * |
ci |
) |
[inline, virtual] |
| virtual void Module::OnDelCore |
( |
NickCore * |
nc |
) |
[inline, virtual] |
| virtual void Module::OnDeleteVhost |
( |
NickAlias * |
na |
) |
[inline, virtual] |
Called when a vhost is deleted
- Parameters:
-
| na | The nickalias of the vhost |
Definition at line 800 of file modules.h.
| virtual void Module::OnDelNick |
( |
NickAlias * |
na |
) |
[inline, virtual] |
Called on delnick() @ param na pointer to the nickalias
Reimplemented in NickServCore.
Definition at line 720 of file modules.h.
Called before a XLine is deleted
- Parameters:
-
| source | The source of the XLine |
| x | The XLine |
| xlm | The xline manager it was deleted from |
Definition at line 520 of file modules.h.
Called when a DNS request (question) is recieved.
- Parameters:
-
| req | The dns request |
| reply | The reply that will be sent |
Reimplemented in ModuleDNS.
Definition at line 929 of file modules.h.
Called when anope needs to check passwords against encryption see src/encrypt.c for detailed informations
Reimplemented in EMD5, ENone, EOld, ESHA1, and ESHA256.
Definition at line 348 of file modules.h.
Called after an exception has been added
- Parameters:
-
- Returns:
- EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
Definition at line 499 of file modules.h.
Called before an exception is deleted
- Parameters:
-
| source | The source deleting it |
| ex | The exceotion |
Definition at line 505 of file modules.h.
| virtual void Module::OnFingerprint |
( |
User * |
u |
) |
[inline, virtual] |
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:
-
Reimplemented in NSCert.
Definition at line 790 of file modules.h.
Check whether an access group has a privilege
- Parameters:
-
| group | The group |
| priv | The privilege |
- Returns:
- MOD_ALLOW to allow, MOD_STOP to stop
Reimplemented in CSAccess.
Definition at line 673 of file modules.h.
| virtual void Module::OnJoinChannel |
( |
User * |
u, |
|
|
Channel * |
c | |
|
) |
| | [inline, virtual] |
| virtual void Module::OnLeaveChannel |
( |
User * |
u, |
|
|
Channel * |
c | |
|
) |
| | [inline, virtual] |
Called when a user leaves a channel. From either parting, being kicked, or quitting/killed!
- Parameters:
-
Reimplemented in BotServCore.
Definition at line 422 of file modules.h.
Called when a level for a channel is changed
- Parameters:
-
| source | The source of the command |
| ci | The channel the level was changed on |
| priv | The privilege changed |
| what | The new level |
Definition at line 587 of file modules.h.
| virtual EventReturn Module::OnLoadDatabase |
( |
|
) |
[inline, virtual] |
Called when the databases are loaded
- Returns:
- EVENT_CONTINUE to let other modules continue saving, EVENT_STOP to stop
Reimplemented in DBOld, and DBPlain.
Definition at line 343 of file modules.h.
| virtual void Module::OnLog |
( |
Log * |
l |
) |
[inline, virtual] |
Called when a message is logged
- Parameters:
-
Reimplemented in CSLog.
Definition at line 923 of file modules.h.
Called when a memo is deleted
- Parameters:
-
| ci | The channel of the memo being deleted |
| mi | The memo info |
| m | The memo |
Definition at line 827 of file modules.h.
Called when a memo is deleted
- Parameters:
-
| nc | The nickcore of the memo being deleted |
| mi | The memo info |
| m | The memo |
Definition at line 820 of file modules.h.
Called when a memo is sent
- Parameters:
-
| source | The source of the memo |
| target | The target of the memo |
| mi | Memo info for target |
| m | The memo |
Definition at line 813 of file modules.h.
Called whenever a message is received from the uplink
- Parameters:
-
| source | The source of the message |
| command | The command being executed |
| params | Parameters |
- Returns:
- EVENT_STOP to prevent the protocol module from processing this message
Definition at line 968 of file modules.h.
Called when a mode is about to be mlocked
- Parameters:
-
| ci | The channel the mode is being locked on |
| lock | The mode lock |
- Returns:
- EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.
Reimplemented in ProtoInspIRCd, and ProtoUnreal.
Definition at line 874 of file modules.h.
| virtual void Module::OnModuleLoad |
( |
User * |
u, |
|
|
Module * |
m | |
|
) |
| | [inline, virtual] |
Called after a module is loaded
- Parameters:
-
| u | The user loading the module, can be NULL |
| m | The module |
Definition at line 887 of file modules.h.
| virtual void Module::OnModuleUnload |
( |
User * |
u, |
|
|
Module * |
m | |
|
) |
| | [inline, virtual] |
Called before a module is unloaded
- Parameters:
-
| u | The user, can be NULL |
| m | The module |
Reimplemented in ModuleDNS.
Definition at line 893 of file modules.h.
| virtual void Module::OnNewServer |
( |
Server * |
s |
) |
[inline, virtual] |
Called when a new server connects to the network.
- Parameters:
-
| s | The server that has connected to the network |
Reimplemented in ModuleDNS, and GlobalCore.
Definition at line 299 of file modules.h.
Called when a user adds an entry to their access list
- Parameters:
-
| nc | The nick |
| entry | The entry |
Definition at line 742 of file modules.h.
Called when a user adds an entry to their cert list
- Parameters:
-
| nc | The nick |
| entry | The entry |
Definition at line 759 of file modules.h.
| virtual void Module::OnNickClearAccess |
( |
NickCore * |
nc |
) |
[inline, virtual] |
| virtual void Module::OnNickClearCert |
( |
NickCore * |
nc |
) |
[inline, virtual] |
Called when a nick is dropped
- Parameters:
-
| source | The source of the command |
| na | The nick |
Definition at line 679 of file modules.h.
| virtual void Module::OnNickExpire |
( |
NickAlias * |
na |
) |
[inline, virtual] |
Called when a nick drops
- Parameters:
-
Definition at line 488 of file modules.h.
| virtual void Module::OnNickForbidden |
( |
NickAlias * |
na |
) |
[inline, virtual] |
Called when a nick is forbidden
- Parameters:
-
| na | The nick alias of the forbidden nick |
Definition at line 684 of file modules.h.
| virtual void Module::OnNickGroup |
( |
User * |
u, |
|
|
NickAlias * |
target | |
|
) |
| | [inline, virtual] |
Called when a user groups their nick
- Parameters:
-
| u | The user grouping |
| target | The target they're grouping to |
Reimplemented in NickServCore.
Definition at line 690 of file modules.h.
| virtual void Module::OnNickIdentify |
( |
User * |
u |
) |
[inline, virtual] |
Called when a user requests info for a nick
- Parameters:
-
| source | The user requesting info |
| na | The nick the user is requesting info from |
| info | Data to show the user requesting information |
| show_hidden | true if we should show the user everything |
Reimplemented in NSSetMisc.
Definition at line 773 of file modules.h.
| virtual void Module::OnNickLogout |
( |
User * |
u |
) |
[inline, virtual] |
| virtual void Module::OnNickRegister |
( |
NickAlias * |
na |
) |
[inline, virtual] |
| virtual void Module::OnNickSuspend |
( |
NickAlias * |
na |
) |
[inline, virtual] |
Called when a nick is suspended
- Parameters:
-
Definition at line 710 of file modules.h.
| virtual void Module::OnNickUnsuspended |
( |
NickAlias * |
na |
) |
[inline, virtual] |
Called when a nick is unsuspneded
- Parameters:
-
Definition at line 715 of file modules.h.
| virtual void Module::OnNickUpdate |
( |
User * |
u |
) |
[inline, virtual] |
Called when a user parts a channel
- Parameters:
-
| u | The user |
| c | The channel, may be NULL if the channel no longer exists |
| channel | The channel name |
| msg | The part reason |
Reimplemented in CSSeen.
Definition at line 415 of file modules.h.
Called after a command has been executed.
- Parameters:
-
| source | The source of the command |
| command | The command the user executed |
| params | The parameters the user sent |
Definition at line 333 of file modules.h.
Referenced by BotServCore::OnPrivmsg().
| virtual void Module::OnPostUserLogoff |
( |
User * |
u |
) |
[inline, virtual] |
| virtual void Module::OnPreChanExpire |
( |
ChannelInfo * |
ci, |
|
|
bool & |
expire | |
|
) |
| | [inline, virtual] |
Called before a channel expires
- Parameters:
-
| ci | The channel |
| expire | Set to true to allow the chan to expire |
Reimplemented in CSSuspend.
Definition at line 448 of file modules.h.
Called before a user joins a channel
- Parameters:
-
- Returns:
- EVENT_STOP to allow the user to join the channel through restrictions, EVENT_CONTINUE to let other modules decide
Definition at line 429 of file modules.h.
| virtual void Module::OnPreNickExpire |
( |
NickAlias * |
na, |
|
|
bool & |
expire | |
|
) |
| | [inline, virtual] |
Called before a nick expires
- Parameters:
-
| na | The nick |
| expire | Set to true to allow the nick to expire |
Reimplemented in NSSuspend.
Definition at line 483 of file modules.h.
| virtual void Module::OnPrePartChannel |
( |
User * |
u, |
|
|
Channel * |
c | |
|
) |
| | [inline, virtual] |
Called before a user parts a channel
- Parameters:
-
Definition at line 407 of file modules.h.
| virtual void Module::OnPreServerConnect |
( |
|
) |
[inline, virtual] |
| virtual void Module::OnPreUplinkSync |
( |
Server * |
serv |
) |
[inline, virtual] |
Called when we are almost done synching with the uplink, just before we send the EOB
Definition at line 465 of file modules.h.
| virtual void Module::OnPreUserLogoff |
( |
User * |
u |
) |
[inline, virtual] |
Called when a user disconnects, before and after being internally removed from all lists (channels, user list, etc)
- Parameters:
-
Reimplemented in ModuleDNS, and OSSession.
Definition at line 543 of file modules.h.
Called when we receive a PRIVMSG for a registered channel we are in
- Parameters:
-
| u | The source of the message |
| c | The channel |
| msg | The message |
Reimplemented in BSKick, MChanstats, and BotServCore.
Definition at line 918 of file modules.h.
| virtual void Module::OnReload |
( |
|
) |
[inline, virtual] |
Called when Services' configuration has been loaded.
Reimplemented in CSAccess, CSEntryMessage, CSStats, CSTop, CSFlags, CSSeen, CSSet, CSSetMisc, HSRequest, NSSet, NSSetMisc, OSDefcon, ModuleDNS, OSLogSearch, DBPlain, BSAutoAssign, MChanstats, ModuleDNS, ModuleDNSBL, HelpChannel, HTTPD, NSIdentifyLDAP, LDAPOper, ModuleProxyScan, ModuleRewrite, ModuleSQLAuthentication, ModuleSQLOper, ModuleSQLite, SSLModule, ModuleXMLRPC, and NSMaxEmail.
Definition at line 273 of file modules.h.
| virtual void Module::OnRestart |
( |
|
) |
[inline, virtual] |
| virtual EventReturn Module::OnSaveDatabase |
( |
|
) |
[inline, virtual] |
Called when the databases are saved
- Returns:
- EVENT_CONTINUE to let other modules continue saving, EVENT_STOP to stop
Reimplemented in DBPlain.
Definition at line 338 of file modules.h.
| virtual void Module::OnSerializableConstruct |
( |
Serializable * |
|
) |
[inline, virtual] |
| virtual void Module::OnSerializableDestruct |
( |
Serializable * |
|
) |
[inline, virtual] |
| virtual void Module::OnSerializableUpdate |
( |
Serializable * |
|
) |
[inline, virtual] |
| virtual void Module::OnSerializeCheck |
( |
Serialize::Type * |
|
) |
[inline, virtual] |
| virtual void Module::OnSerializeTypeCreate |
( |
Serialize::Type * |
|
) |
[inline, virtual] |
| virtual void Module::OnServerConnect |
( |
|
) |
[inline, virtual] |
| virtual void Module::OnServerDisconnect |
( |
|
) |
[inline, virtual] |
Called when Anope disconnects from its uplink, before it tries to reconnect
Definition at line 469 of file modules.h.
| virtual void Module::OnServerQuit |
( |
Server * |
server |
) |
[inline, virtual] |
| virtual void Module::OnServerSync |
( |
Server * |
s |
) |
[inline, virtual] |
Called when a server is synced
- Parameters:
-
| s | The server, can be our uplink server |
Reimplemented in NickServCore.
Definition at line 898 of file modules.h.
Called when a chanserv/set command is used
- Parameters:
-
| source | The source of the command |
| cmd | The command |
| ci | The channel the command was used on |
| setting | The setting passed to the command. Probably ON/OFF. |
- Returns:
- EVENT_ALLOW to bypass access checks, EVENT_STOP to halt immediately.
Reimplemented in ProtoInspIRCd.
Definition at line 951 of file modules.h.
Called when a nickserv/set command is used.
- Parameters:
-
| source | The source of the command |
| cmd | The command |
| nc | The nickcore being modifed |
| setting | The setting passed to the command. Probably ON/OFF. |
- Returns:
- EVENT_STOP to halt immediately
Definition at line 960 of file modules.h.
| virtual void Module::OnSetVhost |
( |
NickAlias * |
na |
) |
[inline, virtual] |
Called when a vhost is set
- Parameters:
-
| na | The nickalias of the vhost |
Definition at line 805 of file modules.h.
| virtual void Module::OnShutdown |
( |
|
) |
[inline, virtual] |
Called when a new topic is set
- Parameters:
-
| c | The channel |
| setter | The user who set the new topic |
| topic | The new topic |
Reimplemented in MChanstats.
Definition at line 442 of file modules.h.
Called when a mode is about to be unlocked
- Parameters:
-
| ci | The channel the mode is being unlocked from |
| lock | The mode lock |
- Returns:
- EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.
Reimplemented in ProtoInspIRCd, and ProtoUnreal.
Definition at line 881 of file modules.h.
| virtual void Module::OnUplinkSync |
( |
Server * |
s |
) |
[inline, virtual] |
Called when we sync with our uplink
- Parameters:
-
Reimplemented in DBOld.
Definition at line 903 of file modules.h.
| virtual void Module::OnUserAway |
( |
User * |
u, |
|
|
const Anope::string & |
message | |
|
) |
| | [inline, virtual] |
Called when a user becomes (un)away
- Parameters:
-
| message | The message, is .empty() if unaway |
Reimplemented in MemoServCore.
Definition at line 795 of file modules.h.
| virtual void Module::OnUserConnect |
( |
User * |
u, |
|
|
bool & |
exempt | |
|
) |
| | [inline, virtual] |
Called when the ircd notifies that a user has been kicked from a channel.
- Parameters:
-
| c | The channel the user has been kicked from. |
| target | The user that has been kicked. |
| source | The nick of the sender. |
| kickmsg | The reason for the kick. |
Reimplemented in CSSeen, and MChanstats.
Definition at line 269 of file modules.h.
| virtual void Module::OnUserModeAdd |
( |
UserMode * |
um |
) |
[inline, virtual] |
Called when a user mode is introducted into Anope
- Parameters:
-
Definition at line 867 of file modules.h.
| virtual void Module::OnUserModeSet |
( |
User * |
u, |
|
|
const Anope::string & |
mname | |
|
) |
| | [inline, virtual] |
| virtual void Module::OnUserModeUnset |
( |
User * |
u, |
|
|
const Anope::string & |
mname | |
|
) |
| | [inline, virtual] |
Called when a mode is unset from a user
- Parameters:
-
| u | The user |
| mname | The mode name |
Reimplemented in OperServCore.
Definition at line 857 of file modules.h.
| virtual void Module::OnUserNickChange |
( |
User * |
u, |
|
|
const Anope::string & |
oldnick | |
|
) |
| | [inline, virtual] |
Called after a user changed the nick
- Parameters:
-
| u | The user. |
| oldnick | The old nick of the user |
Reimplemented in CSSeen, NSRecover, OSForbid, ProtoBahamut, ProtoHybrid, ProtoInspIRCd, ProtoInspIRCd, ProtoInspIRCd, ProtongIRCd, ProtoUnreal, NickServCore, and OperServCore.
Definition at line 305 of file modules.h.
| virtual void Module::OnUserQuit |
( |
User * |
u, |
|
|
const Anope::string & |
msg | |
|
) |
| | [inline, virtual] |
Called on a QUIT
- Parameters:
-
| u | The user |
| msg | The quit message |
Reimplemented in CSSeen.
Definition at line 537 of file modules.h.
Set the modules author info
- Parameters:
-
| author | the author of the module |
Definition at line 81 of file module.cpp.
References author.
Referenced by BotServCore::BotServCore(), BSAssign::BSAssign(), BSAutoAssign::BSAutoAssign(), BSBadwords::BSBadwords(), BSBot::BSBot(), BSBotList::BSBotList(), BSControl::BSControl(), BSInfo::BSInfo(), BSKick::BSKick(), BSSet::BSSet(), ChanServCore::ChanServCore(), CSAccess::CSAccess(), CSAKick::CSAKick(), CSBan::CSBan(), CSClone::CSClone(), CSDrop::CSDrop(), CSEnforce::CSEnforce(), CSEntryMessage::CSEntryMessage(), CSFlags::CSFlags(), CSGetKey::CSGetKey(), CSInfo::CSInfo(), CSInvite::CSInvite(), CSKick::CSKick(), CSList::CSList(), CSLog::CSLog(), CSMode::CSMode(), CSRegister::CSRegister(), CSSeen::CSSeen(), CSSet::CSSet(), CSSetMisc::CSSetMisc(), CSStats::CSStats(), CSStatus::CSStatus(), CSSuspend::CSSuspend(), CSSync::CSSync(), CSTop::CSTop(), CSTopic::CSTopic(), CSUnban::CSUnban(), CSUpDown::CSUpDown(), CSXOP::CSXOP(), DBFlatFile::DBFlatFile(), DBOld::DBOld(), DBPlain::DBPlain(), EMD5::EMD5(), ENone::ENone(), EOld::EOld(), ESHA1::ESHA1(), ESHA256::ESHA256(), GLGlobal::GLGlobal(), GlobalCore::GlobalCore(), Help::Help(), HelpChannel::HelpChannel(), HostServCore::HostServCore(), HSDel::HSDel(), HSGroup::HSGroup(), HSList::HSList(), HSOff::HSOff(), HSOn::HSOn(), HSRequest::HSRequest(), HSSet::HSSet(), HTTPD::HTTPD(), LDAPOper::LDAPOper(), MChanstats::MChanstats(), MemoServCore::MemoServCore(), ModuleDNS::ModuleDNS(), ModuleProxyScan::ModuleProxyScan(), ModuleRegexPCRE::ModuleRegexPCRE(), ModuleRegexPOSIX::ModuleRegexPOSIX(), ModuleRegexTRE::ModuleRegexTRE(), ModuleRewrite::ModuleRewrite(), ModuleSQLAuthentication::ModuleSQLAuthentication(), ModuleSQLOper::ModuleSQLOper(), ModuleWebCPanel::ModuleWebCPanel(), MSCancel::MSCancel(), MSCheck::MSCheck(), MSDel::MSDel(), MSIgnore::MSIgnore(), MSInfo::MSInfo(), MSList::MSList(), MSRead::MSRead(), MSRSend::MSRSend(), MSSend::MSSend(), MSSendAll::MSSendAll(), MSSet::MSSet(), MSStaff::MSStaff(), NickServCore::NickServCore(), NSAccess::NSAccess(), NSAJoin::NSAJoin(), NSAList::NSAList(), NSCert::NSCert(), NSDrop::NSDrop(), NSGetEMail::NSGetEMail(), NSGetPass::NSGetPass(), NSGroup::NSGroup(), NSIdentify::NSIdentify(), NSIdentifyLDAP::NSIdentifyLDAP(), NSInfo::NSInfo(), NSList::NSList(), NSLogout::NSLogout(), NSMaxEmail::NSMaxEmail(), NSRecover::NSRecover(), NSRegister::NSRegister(), NSResetPass::NSResetPass(), NSSet::NSSet(), NSSetMisc::NSSetMisc(), NSStatus::NSStatus(), NSSuspend::NSSuspend(), NSUpdate::NSUpdate(), OperServCore::OperServCore(), OSAKill::OSAKill(), OSChanKill::OSChanKill(), OSConfig::OSConfig(), OSDefcon::OSDefcon(), OSForbid::OSForbid(), OSIgnore::OSIgnore(), OSJupe::OSJupe(), OSKick::OSKick(), OSKill::OSKill(), OSList::OSList(), OSLogin::OSLogin(), OSLogSearch::OSLogSearch(), OSMode::OSMode(), OSModInfo::OSModInfo(), OSModule::OSModule(), OSNews::OSNews(), OSNOOP::OSNOOP(), OSOLine::OSOLine(), OSOper::OSOper(), OSReload::OSReload(), OSSession::OSSession(), OSSet::OSSet(), OSShutdown::OSShutdown(), OSStats::OSStats(), OSSVS::OSSVS(), OSSXLine::OSSXLine(), OSUpdate::OSUpdate(), ProtoBahamut::ProtoBahamut(), ProtoHybrid::ProtoHybrid(), ProtoInspIRCd::ProtoInspIRCd(), ProtongIRCd::ProtongIRCd(), ProtoPlexus::ProtoPlexus(), ProtoRatbox::ProtoRatbox(), ProtoUnreal::ProtoUnreal(), and StatusUpdate::StatusUpdate().
| 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:
-
| state | True if this module should be permanent, false else. |
Definition at line 66 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().
Set the modules version info.
- Parameters:
-
| version | the version of the module |
Definition at line 76 of file module.cpp.
References version.
Referenced by Module().
Field Documentation
The module name (e.g. os_modload)
Definition at line 188 of file modules.h.
Referenced by Log::BuildPrefix(), ModuleManager::DeleteModule(), CommandOSModUnLoad::Execute(), CommandOSModReLoad::Execute(), CommandOSModList::Execute(), CommandOSModInfo::Execute(), ModuleManager::FindModule(), Anope::Init(), Log::Log(), Module(), Anope::Process(), Message::Version::Run(), Message::Privmsg::Run(), InspIRCd12Proto::SendConnect(), InspIRCdProto::SendConnect(), and ~Module().
The documentation for this class was generated from the following files: