ZNC
trunk
|
#include <module.h>
Public Types | |
enum | EModRet { CONTINUE = 1, HALT = 2, HALTMODS = 3, HALTCORE = 4 } |
This enum is just used for return from module hooks. More... | |
enum | EModException { UNLOAD } |
Public Member Functions | |
CPerlModule (CUser *pUser, CIRCNetwork *pNetwork, const CString &sModName, const CString &sDataPath, SV *perlObj) | |
SV * | GetPerlObj () |
virtual bool | OnBoot () |
This module hook is called during ZNC startup. More... | |
virtual bool | WebRequiresLogin () |
Modules which can only be used with an active user session have to return true here. More... | |
virtual bool | WebRequiresAdmin () |
Return true if this module should only be usable for admins on the web. More... | |
virtual CString | GetWebMenuTitle () |
Return the title of the module's section in the web interface's side bar. More... | |
virtual bool | OnWebPreRequest (CWebSock &WebSock, const CString &sPageName) |
For WebMods: Called before the list of registered SubPages will be checked. More... | |
virtual bool | OnWebRequest (CWebSock &WebSock, const CString &sPageName, CTemplate &Tmpl) |
If OnWebPreRequest returned false, and the RequiresAdmin/IsAdmin check has been passed, this method will be called with the page name. More... | |
virtual VWebSubPages & | GetSubPages () |
Returns a list of all registered SubPages. More... | |
virtual void | OnPreRehash () |
Called just before znc.conf is rehashed. More... | |
virtual void | OnPostRehash () |
This module hook is called after a successful rehash. More... | |
virtual void | OnIRCDisconnected () |
This module hook is called when a user gets disconnected from IRC. More... | |
virtual void | OnIRCConnected () |
This module hook is called after a successful login to IRC. More... | |
virtual EModRet | OnIRCConnecting (CIRCSock *pIRCSock) |
This module hook is called just before ZNC tries to establish a connection to an IRC server. More... | |
virtual void | OnIRCConnectionError (CIRCSock *pIRCSock) |
This module hook is called when a CIRCSock fails to connect or a module returned HALTCORE from OnIRCConnecting. More... | |
virtual EModRet | OnIRCRegistration (CString &sPass, CString &sNick, CString &sIdent, CString &sRealName) |
This module hook is called before loging in to the IRC server. More... | |
virtual EModRet | OnBroadcast (CString &sMessage) |
This module hook is called when a message is broadcasted to all users. More... | |
virtual void | OnChanPermission2 (const CNick *pOpNick, const CNick &Nick, CChan &Channel, unsigned char uMode, bool bAdded, bool bNoChange) |
This module hook is called when a user mode on a channel changes. More... | |
virtual void | OnOp2 (const CNick *pOpNick, const CNick &Nick, CChan &Channel, bool bNoChange) |
Called when a nick is opped on a channel. More... | |
virtual void | OnDeop2 (const CNick *pOpNick, const CNick &Nick, CChan &Channel, bool bNoChange) |
Called when a nick is deopped on a channel. More... | |
virtual void | OnVoice2 (const CNick *pOpNick, const CNick &Nick, CChan &Channel, bool bNoChange) |
Called when a nick is voiced on a channel. More... | |
virtual void | OnDevoice2 (const CNick *pOpNick, const CNick &Nick, CChan &Channel, bool bNoChange) |
Called when a nick is devoiced on a channel. More... | |
virtual void | OnMode2 (const CNick *pOpNick, CChan &Channel, char uMode, const CString &sArg, bool bAdded, bool bNoChange) |
Called on an individual channel mode change. More... | |
virtual void | OnRawMode2 (const CNick *pOpNick, CChan &Channel, const CString &sModes, const CString &sArgs) |
Called on any channel mode change. More... | |
virtual EModRet | OnRaw (CString &sLine) |
Called on any raw IRC line received from the IRC server. More... | |
virtual EModRet | OnStatusCommand (CString &sCommand) |
Called when a command to *status is sent. More... | |
virtual void | OnModCommand (const CString &sCommand) |
Called when a command to your module is sent, e.g. More... | |
virtual void | OnModNotice (const CString &sMessage) |
Called when a your module nick was sent a notice. More... | |
virtual void | OnModCTCP (const CString &sMessage) |
Called when your module nick was sent a CTCP message. More... | |
virtual void | OnQuit (const CNick &Nick, const CString &sMessage, const std::vector< CChan * > &vChans) |
Called when a nick quit from IRC. More... | |
virtual void | OnNick (const CNick &Nick, const CString &sNewNick, const std::vector< CChan * > &vChans) |
Called when a nickname change occurs. More... | |
virtual void | OnKick (const CNick &OpNick, const CString &sKickedNick, CChan &Channel, const CString &sMessage) |
Called when a nick is kicked from a channel. More... | |
virtual void | OnJoin (const CNick &Nick, CChan &Channel) |
Called when a nick joins a channel. More... | |
virtual void | OnPart (const CNick &Nick, CChan &Channel, const CString &sMessage) |
Called when a nick parts a channel. More... | |
virtual EModRet | OnChanBufferStarting (CChan &Chan, CClient &Client) |
Called before a channel buffer is played back to a client. More... | |
virtual EModRet | OnChanBufferEnding (CChan &Chan, CClient &Client) |
Called after a channel buffer was played back to a client. More... | |
virtual EModRet | OnChanBufferPlayLine (CChan &Chan, CClient &Client, CString &sLine) |
Called when for each line during a channel's buffer play back. More... | |
virtual EModRet | OnPrivBufferPlayLine (CClient &Client, CString &sLine) |
Called when a line from the query buffer is played back. More... | |
virtual void | OnClientLogin () |
Called when a client successfully logged in to ZNC. More... | |
virtual void | OnClientDisconnect () |
Called when a client disconnected from ZNC. More... | |
virtual EModRet | OnUserRaw (CString &sLine) |
This module hook is called when a client sends a raw traffic line to ZNC. More... | |
virtual EModRet | OnUserCTCPReply (CString &sTarget, CString &sMessage) |
This module hook is called when a client sends a CTCP reply. More... | |
virtual EModRet | OnUserCTCP (CString &sTarget, CString &sMessage) |
This module hook is called when a client sends a CTCP request. More... | |
virtual EModRet | OnUserAction (CString &sTarget, CString &sMessage) |
Called when a client sends a CTCP ACTION request ("/me"). More... | |
virtual EModRet | OnUserMsg (CString &sTarget, CString &sMessage) |
This module hook is called when a user sends a normal IRC message. More... | |
virtual EModRet | OnUserNotice (CString &sTarget, CString &sMessage) |
This module hook is called when a user sends a notice message. More... | |
virtual EModRet | OnUserJoin (CString &sChannel, CString &sKey) |
This hooks is called when a user sends a JOIN message. More... | |
virtual EModRet | OnUserPart (CString &sChannel, CString &sMessage) |
This hooks is called when a user sends a PART message. More... | |
virtual EModRet | OnUserTopic (CString &sChannel, CString &sTopic) |
This module hook is called when a user wants to change a channel topic. More... | |
virtual EModRet | OnUserTopicRequest (CString &sChannel) |
This hook is called when a user requests a channel's topic. More... | |
virtual EModRet | OnCTCPReply (CNick &Nick, CString &sMessage) |
Called when we receive a CTCP reply from IRC. More... | |
virtual EModRet | OnPrivCTCP (CNick &Nick, CString &sMessage) |
Called when we receive a private CTCP request from IRC. More... | |
virtual EModRet | OnChanCTCP (CNick &Nick, CChan &Channel, CString &sMessage) |
Called when we receive a channel CTCP request from IRC. More... | |
virtual EModRet | OnPrivAction (CNick &Nick, CString &sMessage) |
Called when we receive a private CTCP ACTION ("/me" in query) from IRC. More... | |
virtual EModRet | OnChanAction (CNick &Nick, CChan &Channel, CString &sMessage) |
Called when we receive a channel CTCP ACTION ("/me" in a channel) from IRC. More... | |
virtual EModRet | OnPrivMsg (CNick &Nick, CString &sMessage) |
Called when we receive a private message from IRC. More... | |
virtual EModRet | OnChanMsg (CNick &Nick, CChan &Channel, CString &sMessage) |
Called when we receive a channel message from IRC. More... | |
virtual EModRet | OnPrivNotice (CNick &Nick, CString &sMessage) |
Called when we receive a private notice. More... | |
virtual EModRet | OnChanNotice (CNick &Nick, CChan &Channel, CString &sMessage) |
Called when we receive a channel notice. More... | |
virtual EModRet | OnTopic (CNick &Nick, CChan &Channel, CString &sTopic) |
Called when we receive a channel topic change from IRC. More... | |
virtual bool | OnServerCapAvailable (const CString &sCap) |
Called for every CAP received via CAP LS from server. More... | |
virtual void | OnServerCapResult (const CString &sCap, bool bSuccess) |
Called for every CAP accepted or rejected by server (with CAP ACK or CAP NAK after our CAP REQ). More... | |
virtual EModRet | OnTimerAutoJoin (CChan &Channel) |
This module hook is called just before ZNC tries to join a channel by itself because it's in the config but wasn't joined yet. More... | |
virtual bool | OnEmbeddedWebRequest (CWebSock &, const CString &, CTemplate &) |
Using this hook, module can embed web stuff directly to different places. More... | |
virtual EModRet | OnAddNetwork (CIRCNetwork &Network, CString &sErrorRet) |
This module hook is called when a network is being added. More... | |
virtual EModRet | OnDeleteNetwork (CIRCNetwork &Network) |
This module hook is called when a network is deleted. More... | |
virtual EModRet | OnSendToClient (CString &sLine, CClient &Client) |
Called when ZNC sends a raw traffic line to a client. More... | |
virtual EModRet | OnSendToIRC (CString &sLine) |
Called when ZNC sends a raw traffic line to the IRC server. More... | |
void | SetUser (CUser *pUser) |
void | SetNetwork (CIRCNetwork *pNetwork) |
void | SetClient (CClient *pClient) |
void | Unload () |
This function throws CModule::UNLOAD which causes this module to be unloaded. More... | |
virtual bool | OnLoad (const CString &sArgsi, CString &sMessage) |
This module hook is called when a module is loaded. More... | |
virtual CString | GetWebPath () |
virtual CString | GetWebFilesPath () |
virtual void | AddSubPage (TWebSubPage spSubPage) |
Registers a sub page for the sidebar. More... | |
virtual void | ClearSubPages () |
Removes all registered (AddSubPage'd) SubPages. More... | |
virtual void | OnChanPermission (const CNick &OpNick, const CNick &Nick, CChan &Channel, unsigned char uMode, bool bAdded, bool bNoChange) |
virtual void | OnOp (const CNick &OpNick, const CNick &Nick, CChan &Channel, bool bNoChange) |
virtual void | OnDeop (const CNick &OpNick, const CNick &Nick, CChan &Channel, bool bNoChange) |
virtual void | OnVoice (const CNick &OpNick, const CNick &Nick, CChan &Channel, bool bNoChange) |
virtual void | OnDevoice (const CNick &OpNick, const CNick &Nick, CChan &Channel, bool bNoChange) |
virtual void | OnMode (const CNick &OpNick, CChan &Channel, char uMode, const CString &sArg, bool bAdded, bool bNoChange) |
virtual void | OnRawMode (const CNick &OpNick, CChan &Channel, const CString &sModes, const CString &sArgs) |
virtual void | OnUnknownModCommand (const CString &sCommand) |
This is similar to OnModCommand(), but it is only called if HandleCommand didn't find any that wants to handle this. More... | |
virtual EModRet | OnInvite (const CNick &Nick, const CString &sChan) |
Called when user is invited into a channel. More... | |
ModHandle | GetDLL () |
virtual bool | PutIRC (const CString &sLine) |
This function sends a given raw IRC line to the IRC server, if we are connected to one. More... | |
virtual bool | PutUser (const CString &sLine) |
This function sends a given raw IRC line to a client. More... | |
virtual bool | PutStatus (const CString &sLine) |
This function generates a query from *status. More... | |
virtual bool | PutModule (const CString &sLine) |
This function sends a query from your module nick. More... | |
virtual unsigned int | PutModule (const CTable &table) |
This function calls CModule::PutModule(const CString&, const CString&, const CString&) for each line in the table. More... | |
virtual bool | PutModNotice (const CString &sLine) |
Send a notice from your module nick. More... | |
const CString & | GetModName () const |
CString | GetModNick () const |
const CString & | GetModDataDir () const |
Get the module's data dir. More... | |
bool | AddTimer (CTimer *pTimer) |
bool | AddTimer (FPTimer_t pFBCallback, const CString &sLabel, u_int uInterval, u_int uCycles=0, const CString &sDescription="") |
bool | RemTimer (CTimer *pTimer) |
bool | RemTimer (const CString &sLabel) |
bool | UnlinkTimer (CTimer *pTimer) |
CTimer * | FindTimer (const CString &sLabel) |
std::set< CTimer * > ::const_iterator | BeginTimers () const |
std::set< CTimer * > ::const_iterator | EndTimers () const |
virtual void | ListTimers () |
bool | AddSocket (CSocket *pSocket) |
bool | RemSocket (CSocket *pSocket) |
bool | RemSocket (const CString &sSockName) |
bool | UnlinkSocket (CSocket *pSocket) |
CSocket * | FindSocket (const CString &sSockName) |
std::set< CSocket * > ::const_iterator | BeginSockets () const |
std::set< CSocket * > ::const_iterator | EndSockets () const |
virtual void | ListSockets () |
void | AddHelpCommand () |
Register the "Help" command. More... | |
bool | AddCommand (const CModCommand &Command) |
bool | AddCommand (const CString &sCmd, CModCommand::ModCmdFunc func, const CString &sArgs="", const CString &sDesc="") |
bool | RemCommand (const CString &sCmd) |
const CModCommand * | FindCommand (const CString &sCmd) const |
bool | HandleCommand (const CString &sLine) |
This function tries to dispatch the given command via the correct instance of CModCommand. More... | |
void | HandleHelpCommand (const CString &sLine="") |
Send a description of all registered commands via PutModule(). More... | |
bool | LoadRegistry () |
bool | SaveRegistry () const |
bool | SetNV (const CString &sName, const CString &sValue, bool bWriteToDisk=true) |
CString | GetNV (const CString &sName) const |
bool | DelNV (const CString &sName, bool bWriteToDisk=true) |
void | DelNV (MCString::iterator it) |
MCString::iterator | FindNV (const CString &sName) |
MCString::iterator | EndNV () |
MCString::iterator | BeginNV () |
bool | ClearNV (bool bWriteToDisk=true) |
const CString & | GetSavePath () const |
CString | ExpandString (const CString &sStr) const |
CString & | ExpandString (const CString &sStr, CString &sRet) const |
void | SetType (CModInfo::EModuleType eType) |
void | SetDescription (const CString &s) |
void | SetModPath (const CString &s) |
void | SetArgs (const CString &s) |
CModInfo::EModuleType | GetType () const |
const CString & | GetDescription () const |
const CString & | GetArgs () const |
const CString & | GetModPath () const |
CUser * | GetUser () |
CIRCNetwork * | GetNetwork () |
CClient * | GetClient () |
CSockManager * | GetManager () |
virtual EModRet | OnAddUser (CUser &User, CString &sErrorRet) |
This module hook is called when a user is being added. More... | |
virtual EModRet | OnDeleteUser (CUser &User) |
This module hook is called when a user is deleted. More... | |
virtual void | OnClientConnect (CZNCSock *pSock, const CString &sHost, unsigned short uPort) |
This module hook is called when there is an incoming connection on any of ZNC's listening sockets. More... | |
virtual EModRet | OnLoginAttempt (CSmartPtr< CAuthBase > Auth) |
This module hook is called when a client tries to login. More... | |
virtual void | OnFailedLogin (const CString &sUsername, const CString &sRemoteIP) |
Called after a client login was rejected. More... | |
virtual EModRet | OnUnknownUserRaw (CClient *pClient, CString &sLine) |
This function behaves like CModule::OnRaw(), but is also called before the client successfully logged in to ZNC. More... | |
virtual void | OnClientCapLs (CClient *pClient, SCString &ssCaps) |
Called when a client told us CAP LS. More... | |
virtual bool | IsClientCapSupported (CClient *pClient, const CString &sCap, bool bState) |
Called only to check if your module supports turning on/off named capability. More... | |
virtual void | OnClientCapRequest (CClient *pClient, const CString &sCap, bool bState) |
Called when we actually need to turn a capability on or off for a client. More... | |
virtual EModRet | OnModuleLoading (const CString &sModName, const CString &sArgs, CModInfo::EModuleType eType, bool &bSuccess, CString &sRetMsg) |
Called when a module is going to be loaded. More... | |
virtual EModRet | OnModuleUnloading (CModule *pModule, bool &bSuccess, CString &sRetMsg) |
Called when a module is going to be unloaded. More... | |
virtual EModRet | OnGetModInfo (CModInfo &ModInfo, const CString &sModule, bool &bSuccess, CString &sRetMsg) |
Called when info about a module is needed. More... | |
virtual void | OnGetAvailableMods (std::set< CModInfo > &ssMods, CModInfo::EModuleType eType) |
Called when list of available mods is requested. More... | |
Static Public Member Functions | |
static double | GetCoreVersion () |
Protected Attributes | |
CModInfo::EModuleType | m_eType |
CString | m_sDescription |
std::set< CTimer * > | m_sTimers |
std::set< CSocket * > | m_sSockets |
ModHandle | m_pDLL |
CSockManager * | m_pManager |
CUser * | m_pUser |
CIRCNetwork * | m_pNetwork |
CClient * | m_pClient |
CString | m_sModName |
CString | m_sDataDir |
CString | m_sSavePath |
CString | m_sArgs |
CString | m_sModPath |
|
inherited |
|
inherited |
This enum is just used for return from module hooks.
Based on this return, ZNC then decides what to do with the event which caused the module hook.
Enumerator | |
---|---|
CONTINUE |
ZNC will continue event processing normally. This is what you should return normally. |
HALT |
This is the same as both CModule::HALTMODS and CModule::HALTCORE together. |
HALTMODS |
Stop sending this even to other modules which were not called yet. Internally, the event is handled normally. |
HALTCORE |
Continue calling other modules. When done, ignore the event in the ZNC core. (For most module hooks this means that a given event won't be forwarded to the connected users) |
|
inline |
|
inherited |
|
inherited |
|
inherited |
Register the "Help" command.
|
inherited |
|
inlinevirtualinherited |
Registers a sub page for the sidebar.
spSubPage | The SubPage instance. |
|
inherited |
Referenced by CPerlTimer::CPerlTimer(), and CPyTimer::CPyTimer().
|
inherited |
|
inlineinherited |
|
inlineinherited |
References CModule::m_sSockets.
|
inlineinherited |
References CModule::m_sTimers.
|
inherited |
|
inlinevirtualinherited |
Removes all registered (AddSubPage'd) SubPages.
|
inherited |
|
inlineinherited |
|
inlineinherited |
Referenced by MCString_iter::is_end().
|
inlineinherited |
References CModule::m_sSockets.
|
inlineinherited |
References CModule::m_sTimers.
|
inherited |
|
inlineinherited |
|
inlineinherited |
References CModule::m_sArgs.
|
inlineinherited |
References CModule::m_pClient.
|
inlinestaticinherited |
References VERSION.
|
inlineinherited |
References CModule::m_sDescription.
|
inlineinherited |
References CModule::m_pDLL.
|
inlineinherited |
References CModule::m_pManager.
|
inlineinherited |
Get the module's data dir.
Modules can be accompanied by static data, e.g. skins for webadmin. These function will return the path to that data.
References CModule::m_sDataDir.
|
inlineinherited |
References CModule::m_sModName.
|
inherited |
|
inlineinherited |
References CModule::m_sModPath.
|
inlineinherited |
References CModule::m_pNetwork.
|
inline |
|
inherited |
|
virtual |
Returns a list of all registered SubPages.
Don't mess with it too much.
Reimplemented from CModule.
|
inlineinherited |
References CModule::m_eType.
|
inlineinherited |
References CModule::m_pUser.
|
virtualinherited |
|
virtual |
Return the title of the module's section in the web interface's side bar.
Reimplemented from CModule.
|
virtualinherited |
|
inherited |
This function tries to dispatch the given command via the correct instance of CModCommand.
Before this can be called, commands have to be added via AddCommand(). If no matching commands are found then OnUnknownModCommand will be called.
sLine | The command line to handle. |
|
inherited |
Send a description of all registered commands via PutModule().
sLine | The help command that is being asked for. |
|
virtualinherited |
Called only to check if your module supports turning on/off named capability.
pClient | The client which wants to enable/disable a capability. |
sCap | name of capability. |
bState | On or off, depending on which case is interesting for client. |
Reimplemented in CPyModule.
|
virtualinherited |
|
virtualinherited |
|
inherited |
|
virtual |
This module hook is called when a network is being added.
Network | The new IRC network. |
sErrorRet | A message that may be displayed to the user if the module stops adding the network. |
Reimplemented from CModule.
This module hook is called when a user is being added.
User | The user which will be added. |
sErrorRet | A message that may be displayed to the user if the module stops adding the user. |
Reimplemented in CPyModule.
|
virtual |
This module hook is called during ZNC startup.
Only modules loaded from znc.conf get this call.
Reimplemented from CModule.
This module hook is called when a message is broadcasted to all users.
sMessage | The message that is broadcasted. |
Reimplemented from CModule.
|
virtual |
Called when we receive a channel CTCP ACTION ("/me" in a channel) from IRC.
This is called after CModule::OnChanCTCP().
Nick | The nick the action came from. |
Channel | The channel the action was sent to. |
sMessage | The action message |
Reimplemented from CModule.
Called after a channel buffer was played back to a client.
Chan | The channel which was played back. |
Client | The client the buffer was played back to. |
Reimplemented from CModule.
|
virtual |
Called when for each line during a channel's buffer play back.
Chan | The channel this playback is from. |
Client | The client the buffer is played back to. |
sLine | The current line of buffer playback. This is a raw IRC traffic line! |
Reimplemented from CModule.
Called before a channel buffer is played back to a client.
Chan | The channel which will be played back. |
Client | The client the buffer will be played back to. |
Reimplemented from CModule.
|
virtual |
Called when we receive a channel CTCP request from IRC.
Nick | The nick the CTCP request is from. |
Channel | The channel to which the request was sent. |
sMessage | The CTCP request message. |
Reimplemented from CModule.
|
virtual |
Called when we receive a channel message from IRC.
Nick | The nick which sent the message. |
Channel | The channel to which the message was sent. |
sMessage | The message. |
Reimplemented from CModule.
|
virtual |
Called when we receive a channel notice.
Nick | The nick which sent the notice. |
Channel | The channel to which the notice was sent. |
sMessage | The notice message. |
Reimplemented from CModule.
|
virtualinherited |
|
virtual |
This module hook is called when a user mode on a channel changes.
pOpNick | The nick who sent the mode change, or NULL if set by server. |
Nick | The nick whose channel mode changes. |
Channel | The channel on which the user mode is changed. |
uMode | The mode character that is changed, e.g. '@' for op. |
bAdded | True if the mode is added, else false. |
bNoChange | true if this mode change doesn't change anything because the nick already had this permission. |
Reimplemented from CModule.
Called when a client told us CAP LS.
Use ssCaps.insert("cap-name") for announcing capabilities which your module supports.
pClient | The client which requested the list. |
ssCaps | set of caps which will be sent to client. |
Reimplemented in CPyModule.
|
virtualinherited |
Called when we actually need to turn a capability on or off for a client.
pClient | The client which requested the capability. |
sCap | name of wanted capability. |
bState | On or off, depending on which case client needs. |
Reimplemented in CPyModule.
|
virtualinherited |
This module hook is called when there is an incoming connection on any of ZNC's listening sockets.
pSock | The incoming client socket. |
sHost | The IP the client is connecting from. |
uPort | The port the client is connecting from. |
Reimplemented in CPyModule.
|
virtual |
Called when a client disconnected from ZNC.
Reimplemented from CModule.
|
virtual |
Called when a client successfully logged in to ZNC.
Reimplemented from CModule.
Called when we receive a CTCP reply from IRC.
Nick | The nick the CTCP reply is from. |
sMessage | The CTCP reply message. |
Reimplemented from CModule.
|
virtual |
This module hook is called when a network is deleted.
Network | The IRC network which is going to be deleted. |
Reimplemented from CModule.
This module hook is called when a user is deleted.
User | The user which will be deleted. |
Reimplemented in CPyModule.
|
virtualinherited |
|
virtual |
Called when a nick is deopped on a channel.
Reimplemented from CModule.
|
virtualinherited |
|
virtual |
Called when a nick is devoiced on a channel.
Reimplemented from CModule.
|
virtual |
Using this hook, module can embed web stuff directly to different places.
This method is called whenever embededded modules I/O happens. Name of used .tmpl file (if any) is up to caller.
WebSock | Socket for web connection, don't do bad things with it. |
sPageName | Describes the place where web stuff is embedded to. |
Tmpl | Template. Depending on context, you can do various stuff with it. |
Reimplemented from CModule.
|
virtualinherited |
Called after a client login was rejected.
sUsername | The username that tried to log in. |
sRemoteIP | The IP address from which the client tried to login. |
Reimplemented in CPyModule.
|
virtualinherited |
Called when list of available mods is requested.
ssMods | put new modules here. |
bGlobal | true if global modules are needed. |
Reimplemented in CPyModule.
|
virtualinherited |
Called when info about a module is needed.
[out] | ModInfo | put result here, if your module knows it. |
sModule | name of the module. | |
bSuccess | this module provided info about the module. | |
sRetMsg | text describing possible issues. |
Reimplemented in CPyModule.
Called when user is invited into a channel.
Nick | The nick who invited you. |
sChan | The channel the user got invited into |
|
virtual |
This module hook is called after a successful login to IRC.
Reimplemented from CModule.
This module hook is called just before ZNC tries to establish a connection to an IRC server.
pIRCSock | The socket that will be used for the connection. |
Reimplemented from CModule.
|
virtual |
|
virtual |
This module hook is called when a user gets disconnected from IRC.
Reimplemented from CModule.
|
virtual |
This module hook is called before loging in to the IRC server.
The low-level connection is established at this point, but SSL handshakes didn't necessarily finish yet.
sPass | The server password that will be used. |
sNick | The nick that will be used. |
sIdent | The protocol identity that will be used. This is not the ident string that is transfered via e.g. oidentd! |
sRealName | The real name that will be used. |
Reimplemented from CModule.
Called when a nick joins a channel.
Nick | The nick who joined. |
Channel | The channel which was joined. |
Reimplemented from CModule.
|
virtual |
Called when a nick is kicked from a channel.
OpNick | The nick which generated the kick. |
sKickedNick | The nick which was kicked. |
Channel | The channel on which this kick occurs. |
sMessage | The kick message. |
Reimplemented from CModule.
This module hook is called when a module is loaded.
sArgsi | The arguments for the modules. |
sMessage | A message that may be displayed to the user after loading the module. Useful for returning error messages. |
This module hook is called when a client tries to login.
If your module wants to handle the login attempt, it must return CModule::EModRet::HALT;
Auth | The necessary authentication info for this login attempt. |
Reimplemented in CPyModule.
|
virtual |
Called when a command to your module is sent, e.g.
query to *modname.
sCommand | The command that was sent. |
Reimplemented from CModule.
|
virtual |
Called when your module nick was sent a CTCP message.
OnModCommand() won't be called for this message.
sMessage | The message which was sent. |
Reimplemented from CModule.
|
virtualinherited |
|
virtual |
Called on an individual channel mode change.
pOpNick | The nick who changes the channel mode, or NULL if set by server. |
Channel | The channel whose mode is changed. |
uMode | The mode character that is changed. |
sArg | The argument to the mode character, if any. |
bAdded | True if this mode is added ("+"), else false. |
bNoChange | True if this mode was already effective before. |
Reimplemented from CModule.
|
virtual |
Called when a your module nick was sent a notice.
sMessage | The message which was sent. |
Reimplemented from CModule.
|
virtualinherited |
Called when a module is going to be loaded.
sModName | name of the module. | |
eType | wanted type of the module (user/global). | |
sArgs | arguments of the module. | |
[out] | bSuccess | the module was loaded successfully as result of this module hook? |
[out] | sRetMsg | text about loading of the module. |
Reimplemented in CPyModule.
|
virtualinherited |
Called when a module is going to be unloaded.
pModule | the module. | |
[out] | bSuccess | the module was unloaded successfully as result of this module hook? |
[out] | sRetMsg | text about unloading of the module. |
Reimplemented in CPyModule.
|
virtual |
Called when a nickname change occurs.
If we are changing our nick, sNewNick will equal m_pIRCSock->GetNick().
Nick | The nick which changed its nickname |
sNewNick | The new nickname. |
vChans | Channels which we and nick share. |
Reimplemented from CModule.
|
virtualinherited |
|
virtual |
Called when a nick is opped on a channel.
Reimplemented from CModule.
|
virtual |
Called when a nick parts a channel.
Nick | The nick who parted. |
Channel | The channel which was parted. |
sMessage | The part message. |
Reimplemented from CModule.
|
virtual |
This module hook is called after a successful rehash.
Reimplemented from CModule.
|
virtual |
Called just before znc.conf is rehashed.
Reimplemented from CModule.
Called when we receive a private CTCP ACTION ("/me" in query) from IRC.
This is called after CModule::OnPrivCTCP().
Nick | The nick the action came from. |
sMessage | The action message |
Reimplemented from CModule.
Called when a line from the query buffer is played back.
Client | The client this line will go to. |
sLine | The raw IRC traffic line from the buffer. |
Reimplemented from CModule.
Called when we receive a private CTCP request from IRC.
Nick | The nick the CTCP request is from. |
sMessage | The CTCP request message. |
Reimplemented from CModule.
Called when we receive a private message from IRC.
Nick | The nick which sent the message. |
sMessage | The message. |
Reimplemented from CModule.
Called when we receive a private notice.
Nick | The nick which sent the notice. |
sMessage | The notice message. |
Reimplemented from CModule.
|
virtual |
Called when a nick quit from IRC.
Nick | The nick which quit. |
sMessage | The quit message. |
vChans | List of channels which you and nick share. |
Reimplemented from CModule.
Called on any raw IRC line received from the IRC server.
sLine | The line read from the server. |
Reimplemented from CModule.
|
virtualinherited |
|
virtual |
Called on any channel mode change.
This is called before the more detailed mode hooks like e.g. OnOp() and OnMode().
pOpNick | The nick who changes the channel mode, or NULL if set by server. |
Channel | The channel whose mode is changed. |
sModes | The raw mode change, e.g. "+s-io". |
sArgs | All arguments to the mode change from sModes. |
Reimplemented from CModule.
Called when ZNC sends a raw traffic line to a client.
sLine | The raw traffic line sent. |
Client | The client this line is sent to. |
Reimplemented from CModule.
Called when ZNC sends a raw traffic line to the IRC server.
sLine | The raw traffic line sent. |
Reimplemented from CModule.
|
virtual |
Called for every CAP received via CAP LS from server.
sCap | capability supported by server. |
Reimplemented from CModule.
|
virtual |
Called for every CAP accepted or rejected by server (with CAP ACK or CAP NAK after our CAP REQ).
sCap | capability accepted/rejected by server. |
bSuccess | true if capability was accepted, false if rejected. |
Reimplemented from CModule.
Called when a command to *status is sent.
sCommand | The command sent. |
Reimplemented from CModule.
This module hook is called just before ZNC tries to join a channel by itself because it's in the config but wasn't joined yet.
Channel | The channel which will be joined. |
Reimplemented from CModule.
Called when we receive a channel topic change from IRC.
Nick | The nick which changed the topic. |
Channel | The channel whose topic was changed. |
sTopic | The new topic. |
Reimplemented from CModule.
|
virtualinherited |
This is similar to OnModCommand(), but it is only called if HandleCommand didn't find any that wants to handle this.
This is only called if HandleCommand() is called, which practically means that this is only called if you don't overload OnModCommand().
sCommand | The command that was sent. |
This function behaves like CModule::OnRaw(), but is also called before the client successfully logged in to ZNC.
You should always prefer to use CModule::OnRaw() if possible.
pClient | The client which send this line. |
sLine | The raw traffic line which the client sent. |
Reimplemented in CPyModule.
Called when a client sends a CTCP ACTION request ("/me").
sTarget | The target for the CTCP ACTION. Could be a channel name or a nick name. |
sMessage | The action message. |
Reimplemented from CModule.
This module hook is called when a client sends a CTCP request.
sTarget | The target for the CTCP request. Could be a channel name or a nick name. |
sMessage | The CTCP request message. |
Reimplemented from CModule.
This module hook is called when a client sends a CTCP reply.
sTarget | The target for the CTCP reply. Could be a channel name or a nick name. |
sMessage | The CTCP reply message. |
Reimplemented from CModule.
This hooks is called when a user sends a JOIN message.
sChannel | The channel name the join is for. |
sKey | The key for the channel. |
Reimplemented from CModule.
This module hook is called when a user sends a normal IRC message.
sTarget | The target of the message. Could be a channel name or a nick name. |
sMessage | The message which was sent. |
Reimplemented from CModule.
This module hook is called when a user sends a notice message.
sTarget | The target of the message. Could be a channel name or a nick name. |
sMessage | The message which was sent. |
Reimplemented from CModule.
This hooks is called when a user sends a PART message.
sChannel | The channel name the part is for. |
sMessage | The part message the client sent. |
Reimplemented from CModule.
This module hook is called when a client sends a raw traffic line to ZNC.
sLine | The raw traffic line sent. |
Reimplemented from CModule.
This module hook is called when a user wants to change a channel topic.
sChannel | The channel. |
sTopic | The new topic which the user sent. |
Reimplemented from CModule.
This hook is called when a user requests a channel's topic.
sChannel | The channel for which the request is. |
Reimplemented from CModule.
|
virtualinherited |
|
virtual |
Called when a nick is voiced on a channel.
Reimplemented from CModule.
For WebMods: Called before the list of registered SubPages will be checked.
Important: If you return true, you need to take care of calling WebSock.Close! This allows for stuff like returning non-templated data, long-polling and other fun.
WebSock | The active request. |
sPageName | The name of the page that has been requested. |
Reimplemented from CModule.
|
virtual |
If OnWebPreRequest returned false, and the RequiresAdmin/IsAdmin check has been passed, this method will be called with the page name.
It will also be called for pages that have NOT been specifically registered with AddSubPage.
WebSock | The active request. |
sPageName | The name of the page that has been requested. |
Tmpl | The active template. You can add variables, loops and stuff to it. |
Reimplemented from CModule.
|
virtualinherited |
This function sends a given raw IRC line to the IRC server, if we are connected to one.
Else this line is discarded.
sLine | The line which should be sent. |
|
virtualinherited |
Send a notice from your module nick.
If we are in a module hook for a specific client, only that client gets this notice, else all clients will receive it.
sLine | The line which should be sent. |
|
virtualinherited |
This function sends a query from your module nick.
If we are in a module hook for a specific client, only that client gets this message, else all connected clients will receive it.
sLine | The message which should be sent. |
|
virtualinherited |
This function calls CModule::PutModule(const CString&, const CString&, const CString&) for each line in the table.
table | The table which should be send. |
|
virtualinherited |
This function generates a query from *status.
If we are in a module hook for a specific client, only that client gets this message, else all connected clients will receive it.
sLine | The message which should be sent from *status. |
|
virtualinherited |
This function sends a given raw IRC line to a client.
If we are in a module hook which is called for a specific client, only that client will get the line, else all connected clients will receive this line.
sLine | The line which should be sent. |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
References CModule::m_sArgs.
|
inherited |
|
inlineinherited |
References CModule::m_sDescription.
|
inlineinherited |
References CModule::m_sModPath.
|
inherited |
|
inherited |
|
inlineinherited |
References CModule::m_eType.
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
This function throws CModule::UNLOAD which causes this module to be unloaded.
References CModule::UNLOAD.
|
virtual |
Return true if this module should only be usable for admins on the web.
Reimplemented from CModule.
|
virtual |
Modules which can only be used with an active user session have to return true here.
Reimplemented from CModule.
|
protectedinherited |
Referenced by CModule::GetType(), and CModule::SetType().
|
protectedinherited |
Referenced by CModule::GetClient().
|
protectedinherited |
Referenced by CModule::GetDLL().
|
protectedinherited |
Referenced by CModule::GetManager().
|
protectedinherited |
Referenced by CModule::GetNetwork().
|
protectedinherited |
Referenced by CModule::GetUser().
|
protectedinherited |
Referenced by CModule::GetArgs(), and CModule::SetArgs().
|
protectedinherited |
Referenced by CModule::GetModDataDir().
|
protectedinherited |
Referenced by CModule::GetDescription(), and CModule::SetDescription().
|
protectedinherited |
Referenced by CModule::GetModName().
|
protectedinherited |
Referenced by CModule::GetModPath(), and CModule::SetModPath().
|
protectedinherited |
|
protectedinherited |
Referenced by CModule::BeginSockets(), and CModule::EndSockets().
|
protectedinherited |
Referenced by CModule::BeginTimers(), and CModule::EndTimers().