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

View File

@@ -19,6 +19,7 @@
#include <znc/User.h>
#include <znc/IRCNetwork.h>
using std::map;
using std::vector;
#define CALLMOD(MOD, CLIENT, USER, NETWORK, FUNC) { \
@@ -753,8 +754,12 @@ CString CClient::GetFullName() {
}
void CClient::PutClient(const CString& sLine) {
DEBUG("(" << GetFullName() << ") ZNC -> CLI [" << sLine << "]");
Write(sLine + "\r\n");
bool bReturn = false;
CString sCopy = sLine;
ALLMODULECALL(OnSendToClient(sCopy, *this), &bReturn);
if (bReturn) return;
DEBUG("(" << GetFullName() << ") ZNC -> CLI [" << sCopy << "]");
Write(sCopy + "\r\n");
}
void CClient::PutStatusNotice(const CString& sLine) {