mirror of
https://github.com/znc/znc.git
synced 2026-07-04 08:51:14 +02:00
Clear channel buffers if keep buffer is disabled and we're online
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ public:
|
||||
void SetTopicOwner(const CString& s) { m_sTopicOwner = s; }
|
||||
void SetTopicDate(unsigned long u) { m_ulTopicDate = u; }
|
||||
void SetDefaultModes(const CString& s) { m_sDefaultModes = s; }
|
||||
void SetKeepBuffer(bool b) { m_bKeepBuffer = b; }
|
||||
void SetKeepBuffer(bool b);
|
||||
void SetDetached(bool b = true) { m_bDetached = b; }
|
||||
void SetInConfig(bool b) { m_bInConfig = b; }
|
||||
void SetCreationDate(unsigned long u) { m_ulCreationDate = u; }
|
||||
|
||||
@@ -219,6 +219,14 @@ void CChan::SetModes(const CString& sModes) {
|
||||
ModeChange(sModes);
|
||||
}
|
||||
|
||||
void CChan::SetKeepBuffer(bool b) {
|
||||
m_bKeepBuffer = b;
|
||||
|
||||
if (!m_bKeepBuffer && !IsDetached() && m_pNetwork->IsUserOnline()) {
|
||||
ClearBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
void CChan::OnWho(const CString& sNick, const CString& sIdent, const CString& sHost) {
|
||||
CNick* pNick = FindNick(sNick);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user