]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Remove PATH_MAX because some retard removed it
[user/henk/code/inspircd.git] / src / configreader.cpp
index 42a3cd4dea20910c38a19b7d697e9b6e1658da8b..19f5cc21cd8df5cff0389890eb377689dbab68a9 100644 (file)
@@ -528,7 +528,7 @@ bool DoConnect(ServerConfig* conf, const char*, char**, ValueList &values, int*)
                         ((*name && (cc->GetName() == name)) || // if the name is the same
                         (*allow && (cc->GetHost() == allow)) || // or the allow is the same
                         (*deny && (cc->GetHost() == deny))) && // or the deny is the same
-                        (!port || port && (cc->GetPort() == port)) // and there is no port, or there is a port and the port is the same
+                        (!port || (port && (cc->GetPort() == port))) // and there is no port, or there is a port and the port is the same
                   )
                {
                        /* reenable class so users can be shoved into it :P */
@@ -1307,10 +1307,13 @@ void ServerConfig::Read(bool bail, User* user)
        ServerInstance->Parser->SetupCommandTable(user);
        ServerInstance->Threads->Mutex(false);
 
-       if (user)
-               user->WriteServ("NOTICE %s :*** Successfully rehashed server.", user->nick.c_str());
-       else
-               ServerInstance->SNO->WriteToSnoMask('A', "*** Successfully rehashed server.");
+       if (!bail)
+       {
+               if (user)
+                       user->WriteServ("NOTICE %s :*** Successfully rehashed server.", user->nick.c_str());
+               else
+                       ServerInstance->SNO->WriteToSnoMask('A', "*** Successfully rehashed server.");
+       }
 
 }
 
@@ -2068,7 +2071,7 @@ bool ServerConfig::DirValid(const char* dirandfile)
 
 std::string ServerConfig::GetFullProgDir()
 {
-       char buffer[PATH_MAX+1];
+       char buffer[4096];
 #ifdef WINDOWS
        /* Windows has specific api calls to get the exe path that never fail.
         * For once, windows has something of use, compared to the POSIX code
@@ -2082,7 +2085,7 @@ std::string ServerConfig::GetFullProgDir()
        }
 #else
        // Get the current working directory
-       if (getcwd(buffer, PATH_MAX))
+       if (getcwd(buffer, 4096))
        {
                std::string remainder = this->argv[0];