summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-08 14:43:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-08 14:43:37 +0000
commitcefc833f34b479a0166aa0ebd30f084eb8515d48 (patch)
tree7f6fd946e8418a71b6e40456861edc493a27f483 /src
parentf393f58b5cf34dc17350c4ba9a22707751ef9f7a (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp6
1 files changed, 6 insertions, 0 deletions
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)