mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Pass CMessage to buffer playback hooks
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <znc/Server.h>
|
||||
#include <znc/Chan.h>
|
||||
#include <znc/Query.h>
|
||||
#include <znc/Message.h>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
@@ -642,11 +643,15 @@ void CIRCNetwork::ClientConnected(CClient *pClient) {
|
||||
uSize = m_NoticeBuffer.Size();
|
||||
for (uIdx = 0; uIdx < uSize; uIdx++) {
|
||||
const CBufLine& BufLine = m_NoticeBuffer.GetBufLine(uIdx);
|
||||
CString sLine = BufLine.GetLine(*pClient, msParams);
|
||||
CMessage Message(BufLine.GetLine(*pClient, msParams));
|
||||
Message.SetNetwork(this);
|
||||
Message.SetClient(pClient);
|
||||
Message.SetTime(BufLine.GetTime());
|
||||
Message.SetTags(BufLine.GetTags());
|
||||
bool bContinue = false;
|
||||
NETWORKMODULECALL(OnPrivBufferPlayLine2(*pClient, sLine, BufLine.GetTime()), m_pUser, this, nullptr, &bContinue);
|
||||
NETWORKMODULECALL(OnPrivBufferPlayMessage(Message), m_pUser, this, nullptr, &bContinue);
|
||||
if (bContinue) continue;
|
||||
pClient->PutClient(sLine);
|
||||
pClient->PutClient(Message);
|
||||
}
|
||||
m_NoticeBuffer.Clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user