From: brain Date: Sun, 8 Jun 2008 14:43:37 +0000 (+0000) Subject: Bitch when we find stray characters outside of a tag, this will track down a lot... X-Git-Tag: v2.0.23~3049 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=cefc833f34b479a0166aa0ebd30f084eb8515d48;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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)