summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-17 03:54:34 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-17 03:54:34 +0000
commit0c71b5c584fbbe1f8488f443fced8b04ca95f160 (patch)
treeb1fb16c4b21d50b9e1e256965bf7ea8f2dbedd24 /src/configreader.cpp
parent8a13e4ebf7cb38008a87cd908d44161b216f5db9 (diff)
Fix DNSServer not being read on initial config read
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11884 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 5d9c3c4d2..83be4dbbd 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -481,7 +481,6 @@ void ServerConfig::Fill()
ModPath = options->getString("moduledir", MOD_PATH);
NetBufferSize = ConfValue("performance")->getInt("netbuffersize", 10240);
MaxWhoResults = ConfValue("performance")->getInt("maxwho", 1024);
- DNSServer = ConfValue("dns")->getString("server");
dns_timeout = ConfValue("dns")->getInt("timeout", 5);
DisabledCommands = ConfValue("disabled")->getString("commands", "");
DisabledDontExist = ConfValue("disabled")->getBool("fakenonexistant");
@@ -621,10 +620,13 @@ void ServerConfig::Read()
{
/* Load and parse the config file, if there are any errors then explode */
- if (!this->DoInclude(ServerInstance->ConfigFileName, true))
+ valid = DoInclude(ServerInstance->ConfigFileName, true);
+ if (valid)
{
- valid = false;
- return;
+ ReadFile(MOTD, ConfValue("files")->getString("motd"));
+ ReadFile(RULES, ConfValue("files")->getString("rules"));
+ DNSServer = ConfValue("dns")->getString("server");
+ FindDNS(DNSServer);
}
}
@@ -1379,10 +1381,6 @@ void ConfigReaderThread::Run()
{
Config = new ServerConfig;
Config->Read();
- Config->ReadFile(Config->MOTD, Config->ConfValue("files")->getString("motd"));
- Config->ReadFile(Config->RULES, Config->ConfValue("files")->getString("rules"));
- FindDNS(Config->DNSServer);
-
done = true;
}