Clear channel buffers if keep buffer is disabled and we're online

This commit is contained in:
Kyle Fuller
2012-03-06 12:18:32 +00:00
parent 9b219289a6
commit f44b7fc7c4
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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; }
+8
View File
@@ -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);