]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configparser.cpp
Adapt modulemanager for the API added in the previous commit.
[user/henk/code/inspircd.git] / src / configparser.cpp
index 89ad6493afaa3f627234e62917ce6bf7d225c659..8bf9aaec297fd5cec25bd5de717395748638c3b8 100644 (file)
@@ -155,7 +155,7 @@ struct Parser
                                }
                                else
                                {
-                                       std::map<std::string, std::string>::iterator var = stack.vars.find(varname);
+                                       insp::flat_map<std::string, std::string>::iterator var = stack.vars.find(varname);
                                        if (var == stack.vars.end())
                                                throw CoreException("Undefined XML entity reference '&" + varname + ";'");
                                        value.append(var->second);
@@ -173,7 +173,7 @@ struct Parser
                        }
                        else if (ch == '"')
                                break;
-                       else
+                       else if (ch != '\r')
                                value.push_back(ch);
                }
 
@@ -367,7 +367,7 @@ void ParseStack::DoReadFile(const std::string& key, const std::string& name, int
 bool ParseStack::ParseFile(const std::string& path, int flags, const std::string& mandatory_tag, bool isexec)
 {
        ServerInstance->Logs->Log("CONFIG", LOG_DEBUG, "Reading (isexec=%d) %s", isexec, path.c_str());
-       if (std::find(reading.begin(), reading.end(), path) != reading.end())
+       if (stdalgo::isin(reading, path))
                throw CoreException((isexec ? "Executable " : "File ") + path + " is included recursively (looped inclusion)");
 
        /* It's not already included, add it to the list of files we've loaded */