From 86f650e6b8c969b31fae65ea1143644723279b82 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 10 Jul 2013 14:28:05 +0100 Subject: Replace range() with min and max arguments on getInt(). --- src/commands/cmd_whowas.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/commands/cmd_whowas.cpp') 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, ""); - RangeCheck(NewMaxGroups, 0, 1000000, 10240, ""); RangeCheck(NewMaxKeep, 3600, INT_MAX, 3600, ""); if ((NewGroupSize == cmd.WhoWasGroupSize) && (NewMaxGroups == cmd.WhoWasMaxGroups) && (NewMaxKeep == cmd.WhoWasMaxKeep)) -- cgit v1.2.3