Add module hooks for raw client and server messages

This commit is contained in:
J-P Nurmi
2014-02-22 00:08:06 +01:00
parent 77652768c6
commit 76bfa99dd0
10 changed files with 52 additions and 4 deletions
+17
View File
@@ -784,6 +784,20 @@ public:
*/
virtual EModRet OnDeleteNetwork(CIRCNetwork& Network);
/** Called when ZNC sends a raw traffic line to a client.
* @param sLine The raw traffic line sent.
* @param Client The client this line is sent to.
* @warning Calling PutUser() from within this hook leads to infinite recursion.
* @return See CModule::EModRet.
*/
virtual EModRet OnSendToClient(CString& sLine, CClient& Client);
/** Called when ZNC sends a raw traffic line to the IRC server.
* @param sLine The raw traffic line sent.
* @warning Calling PutIRC() from within this hook leads to infinite recursion.
* @return See CModule::EModRet.
*/
virtual EModRet OnSendToIRC(CString& sLine);
ModHandle GetDLL() { return m_pDLL; }
static double GetCoreVersion() { return VERSION; }
@@ -1135,6 +1149,9 @@ public:
bool OnAddNetwork(CIRCNetwork& Network, CString& sErrorRet);
bool OnDeleteNetwork(CIRCNetwork& Network);
bool OnSendToClient(CString& sLine, CClient& Client);
bool OnSendToIRC(CString& sLine);
bool OnServerCapAvailable(const CString& sCap);
bool OnServerCapResult(const CString& sCap, bool bSuccess);