Allow reseting channel specific AutoClearChanBuffer & Buffer settings

The trick is to set the value to "-" in controlpanel. Notice that
controlpanel supports wildcards, so this can be used to easily
reset all channels back to defaults if desired.
This commit is contained in:
J-P Nurmi
2015-07-08 22:37:24 +02:00
parent 95520630a1
commit 0d75018157
3 changed files with 23 additions and 4 deletions
+10
View File
@@ -262,6 +262,11 @@ void CChan::InheritAutoClearChanBuffer(bool b) {
}
}
void CChan::ResetAutoClearChanBuffer() {
SetAutoClearChanBuffer(m_pNetwork->GetUser()->AutoClearChanBuffer());
m_bHasAutoClearChanBufferSet = false;
}
void CChan::OnWho(const CString& sNick, const CString& sIdent, const CString& sHost) {
CNick* pNick = FindNick(sNick);
@@ -656,3 +661,8 @@ void CChan::SetInConfig(bool b) {
CZNC::Get().SetConfigState(CZNC::ECONFIG_NEED_WRITE);
}
}
void CChan::ResetBufferCount() {
SetBufferCount(m_pNetwork->GetUser()->GetBufferCount());
m_bHasBufferCountSet = false;
}