]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Update User::exempt all the time we change an E:Line. Brain, can you check I've done...
[user/henk/code/inspircd.git] / src / configreader.cpp
index ed1216c8b10652f60af5b1d6aa9ab39ea30b1a85..d14fc92a8f4af85e6b2ef7f92faa963b18069645 100644 (file)
@@ -1391,15 +1391,10 @@ bool ServerConfig::DoInclude(ConfigDataHash &target, const std::string &file, st
        confpath = ServerInstance->ConfigFileName;
        newfile = file;
 
-       for (std::string::iterator c = newfile.begin(); c != newfile.end(); c++)
-       {
-               if (*c == '\\')
-               {
-                       *c = '/';
-               }
-       }
+       std::replace(newfile.begin(),newfile.end(),'\\','/');
+       std::replace(confpath.begin(),confpath.end(),'\\','/');
 
-       if (file[0] != '/')
+       if (newfile[0] != '/')
        {
                if((pos = confpath.rfind("/")) != std::string::npos)
                {
@@ -1408,7 +1403,7 @@ bool ServerConfig::DoInclude(ConfigDataHash &target, const std::string &file, st
                }
                else
                {
-                       errorstream << "Couldn't get config path from: " << confpath << std::endl;
+                       errorstream << "Couldn't get config path from: " << ServerInstance->ConfigFileName << std::endl;
                        return false;
                }
        }