void init()
{
ServerInstance->Modules->AddService(cmd);
- Implementation eventlist[] = { I_OnGarbageCollect, I_OnUserQuit, I_OnStats, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
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))