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

@@ -1040,8 +1040,13 @@ void CIRCSock::TrySend() {
// This condition must be the same as in PutIRC() and PutIRCQuick()!
while (!m_vsSendQueue.empty() && (!m_bFloodProtection || m_iSendsAllowed > 0)) {
m_iSendsAllowed--;
DEBUG("(" << m_pNetwork->GetUser()->GetUserName() << "/" << m_pNetwork->GetName() << ") ZNC -> IRC [" << m_vsSendQueue.front() << "]");
Write(m_vsSendQueue.front() + "\r\n");
bool bSkip = false;
CString& sLine = m_vsSendQueue.front();
ALLMODULECALL(OnSendToIRC(sLine), &bSkip);
if (!bSkip) {;
DEBUG("(" << m_pNetwork->GetUser()->GetUserName() << "/" << m_pNetwork->GetName() << ") ZNC -> IRC [" << sLine << "]");
Write(sLine + "\r\n");
}
m_vsSendQueue.pop_front();
}
}