Complain about truncated config files

If we were in an user section when we reached the end of the config file, that
user was previously discarded. This makes reading the config file instead.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2083 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-07-10 08:02:32 +00:00
parent ac3b8cfcb1
commit 11f6483270
+6 -2
View File
@@ -1707,13 +1707,17 @@ bool CZNC::DoRehash(CString& sError)
}
if (pChan) {
// TODO last <Chan> not closed
sError = "Last <Chan> section not properly closed. File truncated?";
CUtils::PrintError(sError);
delete pChan;
return false;
}
if (pUser) {
// TODO last <User> not closed
sError = "Last <User> section not properly closed. File truncated?";
CUtils::PrintError(sError);
delete pUser;
return false;
}
if (m_msUsers.empty()) {