X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_whowas.cpp;h=188b0e4d5db48e0ab6d1bd7ee69e48694a548d57;hb=780dda83ba3857bc3c330d4b5d38bb251a9d879b;hp=f456a57db68dd8a877173166c900f7e63b57aea8;hpb=e467fd0a6fc9ba97b2e2f31e654803a86bbb307f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp index f456a57db..188b0e4d5 100644 --- a/src/coremods/core_whowas.cpp +++ b/src/coremods/core_whowas.cpp @@ -22,6 +22,7 @@ #include "inspircd.h" #include "commands/cmd_whowas.h" +#include "modules/stats.h" enum { @@ -260,12 +261,14 @@ WhoWas::Nick::~Nick() stdalgo::delete_all(entries); } -class ModuleWhoWas : public Module +class ModuleWhoWas : public Module, public Stats::EventListener { CommandWhowas cmd; public: - ModuleWhoWas() : cmd(this) + ModuleWhoWas() + : Stats::EventListener(this) + , cmd(this) { } @@ -291,8 +294,8 @@ class ModuleWhoWas : public Module void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { ConfigTag* tag = ServerInstance->Config->ConfValue("whowas"); - unsigned int NewGroupSize = tag->getInt("groupsize", 10, 0, 10000); - unsigned int NewMaxGroups = tag->getInt("maxgroups", 10240, 0, 1000000); + unsigned int NewGroupSize = tag->getUInt("groupsize", 10, 0, 10000); + unsigned int NewMaxGroups = tag->getUInt("maxgroups", 10240, 0, 1000000); unsigned int NewMaxKeep = tag->getDuration("maxkeep", 3600, 3600); cmd.manager.UpdateConfig(NewGroupSize, NewMaxGroups, NewMaxKeep);