[Server] Record uptime through the database interface

This commit is contained in:
Lukas Brübach 2026-11-10 02:27:47 +01:00
parent 23b4a727ec
commit 004f1eaf0d
4 changed files with 49 additions and 13 deletions

View file

@ -733,6 +733,23 @@ public:
return {};
}
/** @brief One row the periodic status update appends to the uptime table. */
struct UptimeRecord
{
int serverId = 0;
int uptimeSecs = 0;
int usersCount = 0;
int modsCount = 0;
QString modsList;
int gamesCount = 0;
quint64 txBytes = 0;
quint64 rxBytes = 0;
};
/** @brief Appends one uptime row; a no-op when persistence is unavailable. */
virtual void recordUptime(const UptimeRecord & /* record */)
{
}
virtual void clearSessionTables()
{
}