mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add ircv3.2 batch and batch channel and query buffer playback.
This commit is contained in:
@@ -44,15 +44,31 @@ void CQuery::SendBuffer(CClient* pClient, const CBuffer& Buffer) {
|
||||
for (size_t uClient = 0; uClient < vClients.size(); ++uClient) {
|
||||
CClient * pUseClient = (pClient ? pClient : vClients[uClient]);
|
||||
|
||||
bool bBatch = pUseClient->HasBatch();
|
||||
CString sBatchName = m_sName.MD5();
|
||||
|
||||
if (bBatch) {
|
||||
m_pNetwork->PutUser(":znc.in BATCH +" + sBatchName + " znc.in/playback " + m_sName, pUseClient);
|
||||
}
|
||||
|
||||
size_t uSize = Buffer.Size();
|
||||
for (size_t uIdx = 0; uIdx < uSize; uIdx++) {
|
||||
CString sLine = Buffer.GetLine(uIdx, *pUseClient, msParams);
|
||||
if (bBatch) {
|
||||
MCString msBatchTags = CUtils::GetMessageTags(sLine);
|
||||
msBatchTags["batch"] = sBatchName;
|
||||
CUtils::SetMessageTags(sLine, msBatchTags);
|
||||
}
|
||||
bool bContinue = false;
|
||||
NETWORKMODULECALL(OnPrivBufferPlayLine(*pUseClient, sLine), m_pNetwork->GetUser(), m_pNetwork, NULL, &bContinue);
|
||||
if (bContinue) continue;
|
||||
m_pNetwork->PutUser(sLine, pUseClient);
|
||||
}
|
||||
|
||||
if (bBatch) {
|
||||
m_pNetwork->PutUser(":znc.in BATCH -" + sBatchName, pUseClient);
|
||||
}
|
||||
|
||||
if (pClient)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user