diff options
author | Peter Powell <petpow@saberuk.com> | 2017-09-03 19:08:52 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-09-03 19:28:50 +0100 |
commit | 74dd288542e28f3604306cc69468f88b14c1b3c5 (patch) | |
tree | 9fddfe8ecafea785380efdc8398185c56e4fb4fb | |
parent | 6399cd9327eac2776355644fe21acb02e52cf16c (diff) |
Move <dns:timeout> out of the core.
-rw-r--r-- | include/configreader.h | 5 | ||||
-rw-r--r-- | include/modules/dns.h | 2 | ||||
-rw-r--r-- | src/configreader.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 2 |
4 files changed, 2 insertions, 9 deletions
diff --git a/include/configreader.h b/include/configreader.h index 1eef60780..8da037e9a 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -336,11 +336,6 @@ class CoreExport ServerConfig */ bool RestrictBannedUsers; - /** The number of seconds the DNS subsystem - * will wait before timing out any request. - */ - int dns_timeout; - /** The size of the read() buffer in the user * handling code, used to read data into a user's * recvQ. diff --git a/include/modules/dns.h b/include/modules/dns.h index 61abd7144..f3bf45916 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -164,7 +164,7 @@ namespace DNS Module* const creator; Request(Manager* mgr, Module* mod, const std::string& addr, QueryType qt, bool usecache = true) - : Timer((ServerInstance->Config->dns_timeout ? ServerInstance->Config->dns_timeout : 5)) + : Timer(ServerInstance->Config->ConfValue("dns")->getDuration("timeout", 5, 1)) , manager(mgr) , question(addr, qt) , use_cache(usecache) diff --git a/src/configreader.cpp b/src/configreader.cpp index 853e0d80f..220026155 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -66,7 +66,6 @@ ServerConfig::ServerConfig() { RawLog = HideBans = HideSplits = false; WildcardIPv6 = true; - dns_timeout = 5; MaxTargets = 20; NetBufferSize = 10240; MaxConn = SOMAXCONN; @@ -419,7 +418,6 @@ void ServerConfig::Fill() ServerDesc = server->getString("description", "Configure Me"); Network = server->getString("network", "Network"); NetBufferSize = ConfValue("performance")->getInt("netbuffersize", 10240, 1024, 65534); - dns_timeout = ConfValue("dns")->getInt("timeout", 5); DisabledCommands = ConfValue("disabled")->getString("commands", ""); DisabledDontExist = ConfValue("disabled")->getBool("fakenonexistant"); UserStats = security->getString("userstats"); diff --git a/src/users.cpp b/src/users.cpp index a84e12b4a..dd0d54286 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -494,7 +494,7 @@ void LocalUser::CheckClass(bool clone_count) } } - this->nping = ServerInstance->Time() + a->GetPingTime() + ServerInstance->Config->dns_timeout; + this->nping = ServerInstance->Time() + a->GetPingTime(); } bool LocalUser::CheckLines(bool doZline) |