mirror of
https://github.com/znc/znc.git
synced 2026-07-05 09:21:31 +02:00
Slight refactor of CBuffer & CBufLine.
This is in preparation of adding more attributes to a CBufLine. Going forward, at least savebuf will need access to all of these to properly serialize buffers. Basically, instead of relying on `GetLine()` to return `false`, the caller is now expected to check bounds himself using `Size()`.
This commit is contained in:
+3
-3
@@ -536,9 +536,9 @@ void CChan::SendBuffer(CClient* pClient) {
|
||||
m_pNetwork->PutUser(":***!znc@znc.in PRIVMSG " + GetName() + " :Buffer Playback...", pUseClient);
|
||||
}
|
||||
|
||||
CString sLine;
|
||||
unsigned int uIdx = 0;
|
||||
while (m_Buffer.GetLine(uIdx++, sLine)) {
|
||||
unsigned int uSize = m_Buffer.Size();
|
||||
for (unsigned int uIdx = 0; uIdx < uSize; uIdx++) {
|
||||
CString sLine = m_Buffer.GetLine(uIdx);
|
||||
NETWORKMODULECALL(OnChanBufferPlayLine(*this, *pUseClient, sLine), m_pNetwork->GetUser(), m_pNetwork, NULL, continue);
|
||||
m_pNetwork->PutUser(sLine, pUseClient);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user