]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Modified the server-to-server TIME command to report the real time (without delta...
[user/henk/code/inspircd.git] / src / configreader.cpp
index 1059770b456aa6bc7410e49a22126c4abfd273d2..9e0a6d8b0e3e54328f3f3d93421b46c682ffb234 100644 (file)
@@ -518,7 +518,7 @@ void ServerConfig::Read(bool bail, userrec* user)
        std::ostringstream errstr;      /* String stream containing the error output */
 
        /* These tags MUST occur and must ONLY occur once in the config file */
-       static char* Once[] = { "server", "admin", "files", "power", "options", "pid", NULL };
+       static char* Once[] = { "server", "admin", "files", "power", "options", NULL };
 
        /* These tags can occur ONCE or not at all */
        static InitialConfig Values[] = {
@@ -771,7 +771,8 @@ void ServerConfig::Read(bool bail, userrec* user)
         */
        if (!bail)
        {
-               ServerInstance->stats->BoundPortCount = ServerInstance->BindPorts(false);
+               int found_ports;
+               ServerInstance->stats->BoundPortCount = ServerInstance->BindPorts(false, found_ports);
 
                if (!removed_modules.empty())
                        for (std::vector<std::string>::iterator removing = removed_modules.begin(); removing != removed_modules.end(); removing++)
@@ -1271,7 +1272,21 @@ bool ServerConfig::ReadFile(file_cache &F, const char* fname)
        char linebuf[MAXBUF];
 
        F.clear();
-       file =  fopen(fname, "r");
+       
+       if (*fname != '/')
+       {
+               std::string::size_type pos;
+               std::string confpath = CONFIG_FILE;
+               if((pos = confpath.find("/inspircd.conf")) != std::string::npos)
+               {
+                       /* Leaves us with just the path */
+                       std::string newfile = confpath.substr(0, pos) + std::string("/") + fname;
+                       file =  fopen(newfile.c_str(), "r");
+                       
+               }
+       }
+       else
+               file =  fopen(fname, "r");
 
        if (file)
        {