From cefc833f34b479a0166aa0ebd30f084eb8515d48 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 8 Jun 2008 14:43:37 +0000 Subject: Bitch when we find stray characters outside of a tag, this will track down a lot of config errors that arent noticed till the end of the file at present git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9866 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/configreader.cpp b/src/configreader.cpp index 56eefa9ed..ba39a563e 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1428,6 +1428,12 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, FILE* &conf, const char* fil if (ch != '\r') line += ch; + if ((ch != '<') && (!in_tag) && (!in_comment) && (ch > ' ') && (ch != 9)) + { + errorstream << "Stray character outside of a configuration tag: '" << ch << "': " << filename << ":" << linenumber << std::endl; + return false; + } + if (ch == '<') { if (in_tag) -- cgit v1.2.3