X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_whowas.cpp;h=8a1c9a820e7378d797a7f261a7a96eb1f2511f67;hb=9d4efff3957f1ad163f726bc44bed3a4870afb94;hp=2779f29ba502e531029198eda0417d01e558d0bb;hpb=8790551dc182cd8804ee7d8ef89ccb31067cc2a4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_whowas.cpp b/src/commands/cmd_whowas.cpp index 2779f29ba..8a1c9a820 100644 --- a/src/commands/cmd_whowas.cpp +++ b/src/commands/cmd_whowas.cpp @@ -183,7 +183,7 @@ void CommandWhowas::PruneWhoWas(time_t t) 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; } @@ -216,7 +216,7 @@ void CommandWhowas::PruneWhoWas(time_t t) 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; @@ -264,7 +264,7 @@ CommandWhowas::~CommandWhowas() 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; } @@ -317,8 +317,6 @@ class ModuleWhoWas : public Module 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); } @@ -344,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))