]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Move the definition of the BanCacheHit constructor into the source file from the...
[user/henk/code/inspircd.git] / src / configreader.cpp
index c4b5c45106f615c98d391669ed2cf7f5d9b063c1..15d9298b6503c1751ab0e47ed503e843e1808b4c 100644 (file)
@@ -36,7 +36,6 @@ ServerConfig::ServerConfig()
        dns_timeout = 5;
        MaxTargets = 20;
        NetBufferSize = 10240;
-       SoftLimit = SocketEngine::GetMaxFds();
        MaxConn = SOMAXCONN;
        MaxChans = 20;
        OperMaxChans = 30;
@@ -176,7 +175,7 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current)
                for(ClassVector::iterator i = current->Classes.begin(); i != current->Classes.end(); ++i)
                {
                        ConnectClass* c = *i;
-                       if (c->name.substr(0, 8) != "unnamed-")
+                       if (c->name.compare(0, 8, "unnamed-", 8))
                        {
                                oldBlocksByMask["n" + c->name] = c;
                        }
@@ -366,7 +365,7 @@ void ServerConfig::Fill()
                if (!nsid.empty() && nsid != sid)
                        throw CoreException("You must restart to change the server id");
        }
-       SoftLimit = ConfValue("performance")->getInt("softlimit", SocketEngine::GetMaxFds(), 10, SocketEngine::GetMaxFds());
+       SoftLimit = ConfValue("performance")->getInt("softlimit", (SocketEngine::GetMaxFds() > 0 ? SocketEngine::GetMaxFds() : LONG_MAX), 10);
        CCOnConnect = ConfValue("performance")->getBool("clonesonconnect", true);
        MaxConn = ConfValue("performance")->getInt("somaxconn", SOMAXCONN);
        XLineMessage = options->getString("xlinemessage", options->getString("moronbanner", "You're banned!"));