mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Added module hooks for when the buffer is being played back
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1494 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -506,17 +506,29 @@ void CChan::SendBuffer(CClient* pClient) {
|
||||
const vector<CString>& vsBuffer = GetBuffer();
|
||||
|
||||
if (vsBuffer.size()) {
|
||||
m_pUser->PutUser(":***!znc@znc.in PRIVMSG " + GetName() + " :Buffer Playback...", pClient);
|
||||
bool bSkipStatusMsg = false;
|
||||
MODULECALL(OnChanBufferStarting(*this, *pClient), m_pUser, NULL, bSkipStatusMsg = true);
|
||||
|
||||
if (!bSkipStatusMsg) {
|
||||
m_pUser->PutUser(":***!znc@znc.in PRIVMSG " + GetName() + " :Buffer Playback...", pClient);
|
||||
}
|
||||
|
||||
for (unsigned int a = 0; a < vsBuffer.size(); a++) {
|
||||
m_pUser->PutUser(vsBuffer[a], pClient);
|
||||
CString sLine(vsBuffer[a]);
|
||||
MODULECALL(OnChanBufferPlayLine(*this, *pClient, sLine), m_pUser, NULL, continue);
|
||||
m_pUser->PutUser(sLine, pClient);
|
||||
}
|
||||
|
||||
if (!KeepBuffer()) {
|
||||
ClearBuffer();
|
||||
}
|
||||
|
||||
m_pUser->PutUser(":***!znc@znc.in PRIVMSG " + GetName() + " :Playback Complete.", pClient);
|
||||
bSkipStatusMsg = false;
|
||||
MODULECALL(OnChanBufferEnding(*this, *pClient), m_pUser, NULL, bSkipStatusMsg = true);
|
||||
|
||||
if (!bSkipStatusMsg) {
|
||||
m_pUser->PutUser(":***!znc@znc.in PRIVMSG " + GetName() + " :Playback Complete.", pClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user