]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Bitch when we find stray characters outside of a tag, this will track down a lot...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 8 Jun 2008 14:43:37 +0000 (14:43 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 8 Jun 2008 14:43:37 +0000 (14:43 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9866 e03df62e-2008-0410-955e-edbf42e46eb7

src/configreader.cpp

index 56eefa9edae58fd046ab231f59f88d6e9e8f07fd..ba39a563ec87b4bc69482aa5ccbeb263dc39ac4e 100644 (file)
@@ -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)