]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Add Module::init() for correct exception handling during hook registration
[user/henk/code/inspircd.git] / src / configreader.cpp
index aebf85ca8b78948b6b1252cfa914bb2676792997..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
@@ -617,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.
         */
@@ -645,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:");