diff options
author | Peter Powell <petpow@saberuk.com> | 2018-04-14 15:43:03 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-04-16 15:29:55 +0100 |
commit | 780dda83ba3857bc3c330d4b5d38bb251a9d879b (patch) | |
tree | 75034915142a3e1362f0f9d59c8e96e1eec22931 /src/coremods | |
parent | 2d36fcb16ef3209fffbe9f4b600971a1edd2ae4b (diff) |
Add ConfigTag::getUInt for reading unsigned config values.
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_dns.cpp | 2 | ||||
-rw-r--r-- | src/coremods/core_whowas.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index 0a835a67a..ea234861a 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -817,7 +817,7 @@ class ModuleDNS : public Module ConfigTag* tag = ServerInstance->Config->ConfValue("dns"); DNSServer = tag->getString("server"); SourceIP = tag->getString("sourceip"); - SourcePort = tag->getInt("sourceport", 0, 0, 65535); + SourcePort = tag->getUInt("sourceport", 0, 0, UINT16_MAX); if (DNSServer.empty()) FindDNSServer(); diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp index 689340a8d..188b0e4d5 100644 --- a/src/coremods/core_whowas.cpp +++ b/src/coremods/core_whowas.cpp @@ -294,8 +294,8 @@ class ModuleWhoWas : public Module, public Stats::EventListener void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { ConfigTag* tag = ServerInstance->Config->ConfValue("whowas"); - unsigned int NewGroupSize = tag->getInt("groupsize", 10, 0, 10000); - unsigned int NewMaxGroups = tag->getInt("maxgroups", 10240, 0, 1000000); + unsigned int NewGroupSize = tag->getUInt("groupsize", 10, 0, 10000); + unsigned int NewMaxGroups = tag->getUInt("maxgroups", 10240, 0, 1000000); unsigned int NewMaxKeep = tag->getDuration("maxkeep", 3600, 3600); cmd.manager.UpdateConfig(NewGroupSize, NewMaxGroups, NewMaxKeep); |