#include "inspircd.h"
#include "commands/cmd_whowas.h"
+#include "modules/stats.h"
enum
{
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)
{
}
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);