From 11f64832700b18b1a50b0694293f0040de629555 Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 10 Jul 2010 08:02:32 +0000 Subject: [PATCH] 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 --- znc.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/znc.cpp b/znc.cpp index e78d6cd0..b8547237 100644 --- a/znc.cpp +++ b/znc.cpp @@ -1707,13 +1707,17 @@ bool CZNC::DoRehash(CString& sError) } if (pChan) { - // TODO last not closed + sError = "Last section not properly closed. File truncated?"; + CUtils::PrintError(sError); delete pChan; + return false; } if (pUser) { - // TODO last not closed + sError = "Last section not properly closed. File truncated?"; + CUtils::PrintError(sError); delete pUser; + return false; } if (m_msUsers.empty()) {