From 0f85fee9e6170896c5fa8640ac275bdb76f4916c Mon Sep 17 00:00:00 2001 From: prozacx Date: Fri, 15 Sep 2006 23:09:13 +0000 Subject: [PATCH] Patched using linenumbers.patch from x-x git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@756 726aef4b-f618-498e-8847-2d620e286838 --- znc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/znc.cpp b/znc.cpp index fc300cfb..df80269b 100644 --- a/znc.cpp +++ b/znc.cpp @@ -734,8 +734,11 @@ bool CZNC::ParseConfig(const CString& sConfig) { bool bCommented = false; // support for /**/ style comments CUser* pUser = NULL; // Used to keep track of which user block we are in CChan* pChan = NULL; // Used to keep track of which chan block we are in + unsigned int uLineNum = 0; while (File.ReadLine(sLine)) { + uLineNum++; + while ((sLine.Right(1) == "\r") || (sLine.Right(1) == "\n")) { sLine.Trim(); } @@ -1107,7 +1110,7 @@ bool CZNC::ParseConfig(const CString& sConfig) { } } - CUtils::PrintError("Unhandled line in config: [" + sLine + "]"); + CUtils::PrintError("Unhandled line " + CString(uLineNum) + " in config: [" + sLine + "]"); return false; }