mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-09 22:33:45 +00:00
The dashboard snapshot counts guilds whose name waits for moderation; the moderation counts (WebSocket and /api/moderation/counts) include it, the Review Queue badge adds it for staff with guilds_manage, and the Guilds menu entry has its own badge. Check: create a guild with a name off the allow list: both badges go up; approve it: they go down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
#ifndef __IDASHBOARDSTATS__H__
|
|
#define __IDASHBOARDSTATS__H__
|
|
|
|
#include <cstdint>
|
|
|
|
class IDashboardStats {
|
|
public:
|
|
// Cheap aggregate values the dashboard compares between ticks to detect changes made by any writer
|
|
// (game servers, other tools). A table is considered changed when any of its values differ.
|
|
struct Snapshot {
|
|
uint64_t accounts{};
|
|
uint64_t accountsMaxId{};
|
|
uint64_t characters{};
|
|
uint64_t pendingNames{};
|
|
uint64_t properties{};
|
|
uint64_t pendingProperties{};
|
|
uint64_t playKeys{};
|
|
uint64_t bugReports{};
|
|
uint64_t unresolvedBugReports{};
|
|
uint64_t petNames{};
|
|
uint64_t pendingPetNames{};
|
|
uint64_t pendingGuildNames{}; // guilds whose name waits for moderation
|
|
uint64_t activityLogMaxId{};
|
|
uint64_t chatLogMaxId{};
|
|
uint64_t commandLogMaxId{};
|
|
uint64_t auditLogMaxId{};
|
|
uint64_t mailMaxId{};
|
|
uint64_t openEconomyFlags{};
|
|
uint64_t economyFlagsMaxId{};
|
|
|
|
bool operator==(const Snapshot&) const = default;
|
|
};
|
|
|
|
virtual Snapshot GetDashboardSnapshot() = 0;
|
|
};
|
|
|
|
#endif //!__IDASHBOARDSTATS__H__
|