void DoStatsReset(CommandSource &source) { Stats *stats = Serialize::GetObject<Stats *>(); stats->SetMaxUserCount(UserListByNick.size()); source.Reply(_("Statistics reset.")); return; }
void OnUserConnect(User *u, bool &exempt) override { Stats *stats = GetStats(); if (stats && UserListByNick.size() > stats->GetMaxUserCount()) { stats->SetMaxUserCount(UserListByNick.size()); stats->SetMaxUserTime(Anope::CurTime); Server *sserver = u->server; if (sserver && sserver->IsSynced()) Log(this, "maxusers") << "connected - new maximum user count: " << UserListByNick.size(); } }