mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add CClient::IsPlaybackActive()
To let modules know whether a client is currently in playback mode. The clientbuffer module (#343) wants to update "last seen message" timestamps in OnSendToClient() but it must avoid doing that while in playback mode.
This commit is contained in:
@@ -44,6 +44,9 @@ void CQuery::SendBuffer(CClient* pClient, const CBuffer& Buffer) {
|
||||
for (size_t uClient = 0; uClient < vClients.size(); ++uClient) {
|
||||
CClient * pUseClient = (pClient ? pClient : vClients[uClient]);
|
||||
|
||||
bool bWasPlaybackActive = pUseClient->IsPlaybackActive();
|
||||
pUseClient->SetPlaybackActive(true);
|
||||
|
||||
bool bBatch = pUseClient->HasBatch();
|
||||
CString sBatchName = m_sName.MD5();
|
||||
|
||||
@@ -78,6 +81,8 @@ void CQuery::SendBuffer(CClient* pClient, const CBuffer& Buffer) {
|
||||
m_pNetwork->PutUser(":znc.in BATCH -" + sBatchName, pUseClient);
|
||||
}
|
||||
|
||||
pUseClient->SetPlaybackActive(bWasPlaybackActive);
|
||||
|
||||
if (pClient)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user