mirror of
https://github.com/znc/znc.git
synced 2026-05-01 19:12:31 +02: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:
@@ -569,6 +569,8 @@ void CIRCNetwork::ClientConnected(CClient *pClient) {
|
||||
|
||||
size_t uIdx, uSize;
|
||||
|
||||
pClient->SetPlaybackActive(true);
|
||||
|
||||
if (m_RawBuffer.IsEmpty()) {
|
||||
pClient->PutClient(":irc.znc.in 001 " + pClient->GetNick() + " :- Welcome to ZNC -");
|
||||
} else {
|
||||
@@ -646,6 +648,8 @@ void CIRCNetwork::ClientConnected(CClient *pClient) {
|
||||
}
|
||||
m_NoticeBuffer.Clear();
|
||||
|
||||
pClient->SetPlaybackActive(false);
|
||||
|
||||
// Tell them why they won't connect
|
||||
if (!GetIRCConnectEnabled())
|
||||
pClient->PutStatus("You are currently disconnected from IRC. "
|
||||
|
||||
Reference in New Issue
Block a user