mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Config writing: Make the <Chan> sections a lot smaller
Buffer, KeepBuffer and AutoCycle are only written if different from the user settings; Detached is only written when set. Thanks to SilverLeo for this patch git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@913 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -58,10 +58,14 @@ bool CChan::WriteConfig(CFile& File) {
|
||||
|
||||
File.Write("\t<Chan " + GetName() + ">\r\n");
|
||||
|
||||
File.Write("\t\tBuffer = " + CString(GetBufferCount()) + "\r\n");
|
||||
File.Write("\t\tKeepBuffer = " + CString((KeepBuffer()) ? "true" : "false") + "\r\n");
|
||||
File.Write("\t\tDetached = " + CString((IsDetached()) ? "true" : "false") + "\r\n");
|
||||
File.Write("\t\tAutoCycle = " + CString((AutoCycle()) ? "true" : "false") + "\r\n");
|
||||
if (m_pUser->GetBufferCount() != GetBufferCount())
|
||||
File.Write("\t\tBuffer = " + CString(GetBufferCount()) + "\r\n");
|
||||
if (m_pUser->KeepBuffer() != KeepBuffer())
|
||||
File.Write("\t\tKeepBuffer = " + CString((KeepBuffer()) ? "true" : "false") + "\r\n");
|
||||
if (IsDetached())
|
||||
File.Write("\t\tDetached = true\r\n");
|
||||
if (m_pUser->AutoCycle() != AutoCycle())
|
||||
File.Write("\t\tAutoCycle = " + CString((AutoCycle()) ? "true" : "false") + "\r\n");
|
||||
if (!GetKey().empty()) { File.Write("\t\tKey = " + GetKey() + "\r\n"); }
|
||||
if (!GetDefaultModes().empty()) { File.Write("\t\tModes = " + GetDefaultModes() + "\r\n"); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user