mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add OnPrivBufferStarting/Ending signals, similar to Chan buffers
Allows hooking into query buffer playback before and after all the lines of the query buffer are replayed. The EModRet return value has no effect at the moment, but may be used in the future to e.g. prevent playback. The Chan version of these signals use EModRet to skip emitting the status message, but not the whole playback.
This commit is contained in:
@@ -44,6 +44,10 @@ void CQuery::SendBuffer(CClient* pClient, const CBuffer& Buffer) {
|
||||
bool bWasPlaybackActive = pUseClient->IsPlaybackActive();
|
||||
pUseClient->SetPlaybackActive(true);
|
||||
|
||||
NETWORKMODULECALL(OnPrivBufferStarting(*this, *pUseClient),
|
||||
m_pNetwork->GetUser(), m_pNetwork, nullptr,
|
||||
NOTHING);
|
||||
|
||||
bool bBatch = pUseClient->HasBatch();
|
||||
CString sBatchName = m_sName.MD5();
|
||||
|
||||
@@ -82,6 +86,10 @@ void CQuery::SendBuffer(CClient* pClient, const CBuffer& Buffer) {
|
||||
pUseClient);
|
||||
}
|
||||
|
||||
NETWORKMODULECALL(OnPrivBufferEnding(*this, *pUseClient),
|
||||
m_pNetwork->GetUser(), m_pNetwork, nullptr,
|
||||
NOTHING);
|
||||
|
||||
pUseClient->SetPlaybackActive(bWasPlaybackActive);
|
||||
|
||||
if (pClient) break;
|
||||
|
||||
Reference in New Issue
Block a user