diff options
author | Attila Molnar <attilamolnar@hush.com> | 2013-08-12 09:20:46 -0700 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2013-08-12 09:20:46 -0700 |
commit | 9d4efff3957f1ad163f726bc44bed3a4870afb94 (patch) | |
tree | 85a67980fb21b7a61756761558fef396adad7dd7 /src/commands | |
parent | dafa2f3031c4abc7f5506385770c4fc743669b17 (diff) | |
parent | 29822a263b3b408559257e9ef2bd29167e7573fa (diff) |
Merge pull request #591 from SaberUK/master+config-tweaks
Various patches relating to configuration.
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_hostname_lookup.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_whowas.cpp | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/commands/cmd_hostname_lookup.cpp b/src/commands/cmd_hostname_lookup.cpp index 1352f0e78..f352443d0 100644 --- a/src/commands/cmd_hostname_lookup.cpp +++ b/src/commands/cmd_hostname_lookup.cpp @@ -199,7 +199,7 @@ class ModuleHostnameLookup : public Module void OnUserInit(LocalUser *user) { - if (!DNS || user->MyClass->nouserdns) + if (!DNS || !user->MyClass->resolvehostnames) { user->WriteNotice("*** Skipping host resolution (disabled by server administrator)"); return; diff --git a/src/commands/cmd_whowas.cpp b/src/commands/cmd_whowas.cpp index 28daf7311..8a1c9a820 100644 --- a/src/commands/cmd_whowas.cpp +++ b/src/commands/cmd_whowas.cpp @@ -342,12 +342,10 @@ class ModuleWhoWas : public Module void OnRehash(User* user) { ConfigTag* tag = ServerInstance->Config->ConfValue("whowas"); - int NewGroupSize = tag->getInt("groupsize"); - int NewMaxGroups = tag->getInt("maxgroups"); + int NewGroupSize = tag->getInt("groupsize", 10, 0, 10000); + int NewMaxGroups = tag->getInt("maxgroups", 10240, 0, 1000000); int NewMaxKeep = InspIRCd::Duration(tag->getString("maxkeep")); - RangeCheck(NewGroupSize, 0, 10000, 10, "<whowas:groupsize>"); - RangeCheck(NewMaxGroups, 0, 1000000, 10240, "<whowas:maxgroups>"); RangeCheck(NewMaxKeep, 3600, INT_MAX, 3600, "<whowas:maxkeep>"); if ((NewGroupSize == cmd.WhoWasGroupSize) && (NewMaxGroups == cmd.WhoWasMaxGroups) && (NewMaxKeep == cmd.WhoWasMaxKeep)) |