if (iter == whowas.end())
{
/* this should never happen, if it does maps are corrupt */
- ServerInstance->Logs->Log("WHOWAS",LOG_DEFAULT, "BUG: Whowas maps got corrupted! (1)");
+ ServerInstance->Logs->Log("WHOWAS", LOG_DEFAULT, "BUG: Whowas maps got corrupted! (1)");
return;
}
if (iter == whowas.end())
{
/* this should never happen, if it does maps are corrupt */
- ServerInstance->Logs->Log("WHOWAS",LOG_DEFAULT, "BUG: Whowas maps got corrupted! (2)");
+ ServerInstance->Logs->Log("WHOWAS", LOG_DEFAULT, "BUG: Whowas maps got corrupted! (2)");
return;
}
whowas_set* n = (whowas_set*)iter->second;
if (iter == whowas.end())
{
/* this should never happen, if it does maps are corrupt */
- ServerInstance->Logs->Log("WHOWAS",LOG_DEFAULT, "BUG: Whowas maps got corrupted! (3)");
+ ServerInstance->Logs->Log("WHOWAS", LOG_DEFAULT, "BUG: Whowas maps got corrupted! (3)");
return;
}
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))