]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd_io.cpp
Optimisations
[user/henk/code/inspircd.git] / src / inspircd_io.cpp
index 76c1429e1152a98b9ea216a0fa263e629a1667b7..8cb4f9dd2fd6022cdb73a2628e327ef0f19d90ef 100644 (file)
@@ -692,7 +692,8 @@ void ServerConfig::Read(bool bail, userrec* user)
 
                if (bail)
                {
-                       printf("There were errors in your configuration:\n%s",errstr.str().c_str());
+                       /* Unneeded because of the log() aboive? */
+                       // printf("There were errors in your configuration:\n%s",errstr.str().c_str());
                        Exit(0);
                }
                else
@@ -1044,6 +1045,12 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const char* filename, std::o
                if((ch == '#') && !in_quote)
                        in_comment = true;
                
+               if(((ch == '\n') || (ch == '\r')) && in_quote)
+               {
+                       errorstream << "Got a newline within a quoted section, this is probably a typo: " << filename << ":" << linenumber << std::endl;
+                       return false;
+               }
+               
                switch(ch)
                {
                        case '\n':
@@ -1223,7 +1230,8 @@ bool ServerConfig::ParseLine(ConfigDataHash &target, std::string &line, long lin
                                                
                                                if((tagname == "include") && (current_key == "file"))
                                                {
-                                                       this->DoInclude(target, current_value, errorstream);
+                                                       if(!this->DoInclude(target, current_value, errorstream))
+                                                               return false;
                                                }
                                                
                                                current_key.clear();