]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Change more modules to VF_OPTCOMMON and assert identical charsets in m_nationalchars
[user/henk/code/inspircd.git] / src / configreader.cpp
index 335b2458d63745bc1cd6158e7a45a5b38ea12cef..c62973c8993388058aafeefc0192c59a778117bc 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -37,7 +37,7 @@ ServerConfig::ServerConfig()
        WhoWasGroupSize = WhoWasMaxGroups = WhoWasMaxKeep = 0;
        NoUserDns = OperSpyWhois = HideBans = HideSplits = UndernetMsgPrefix = false;
        CycleHosts = InvBypassModes = true;
-       dns_timeout = DieDelay = 5;
+       dns_timeout = 5;
        MaxTargets = 20;
        NetBufferSize = 10240;
        SoftLimit = ServerInstance->SE->GetMaxFds();
@@ -366,6 +366,8 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current)
                        me->hardsendqmax = tag->getInt("hardsendq", me->hardsendqmax);
                        me->recvqmax = tag->getInt("recvq", me->recvqmax);
                        me->penaltythreshold = tag->getInt("threshold", me->penaltythreshold);
+                       me->commandrate = tag->getInt("commandrate", me->commandrate);
+                       me->fakelag = tag->getBool("fakelag", me->fakelag);
                        me->maxlocal = tag->getInt("localmax", me->maxlocal);
                        me->maxglobal = tag->getInt("globalmax", me->maxglobal);
                        me->port = tag->getInt("port", me->port);
@@ -431,7 +433,6 @@ void ServerConfig::Fill()
        diepass = ConfValue("power")->getString("diepass");
        restartpass = ConfValue("power")->getString("restartpass");
        powerhash = ConfValue("power")->getString("hash");
-       DieDelay = ConfValue("power")->getInt("pause");
        PrefixQuit = options->getString("prefixquit");
        SuffixQuit = options->getString("suffixquit");
        FixedQuit = options->getString("fixedquit");
@@ -616,6 +617,9 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
        // write once here, to try it out and make sure its ok
        ServerInstance->WritePID(this->PID);
 
+       // Check errors before dealing with failed binds, since continuing on failed bind is wanted in some circumstances.
+       valid = errstr.str().empty();
+
        /*
         * These values can only be set on boot. Keep their old values. Do it before we send messages so we actually have a servername.
         */
@@ -644,7 +648,6 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
 
        User* user = useruid.empty() ? NULL : ServerInstance->FindNick(useruid);
 
-       valid = errstr.str().empty();
        if (!valid)
                ServerInstance->Logs->Log("CONFIG",DEFAULT, "There were errors in your configuration file:");