QcAdminReports Class
The reports of the admin channel (decision E-848), built from the server's state as it is now: status, players, command catalogue, access lists, settings and the log's lines. More...
| Header: | #include <server/admin/QcAdminReports.h> |
Public Types
| struct | Log |
Public Functions
| QcMsg::AdminCatalogue | catalogue() const |
| std::array<quint32, QcEntityKinds::count> | entitiesByKind() const |
| QcMsg::AdminLists | lists() const |
| QcAdminReports::Log | log(QcMsg::AdminLogLine::Level level, qsizetype count, quint64 after, bool tail) const |
| QcMsg::AdminPlayers | players(const QHash<quint32, qint32> &pings) const |
| QcMsg::AdminSettings | settings() const |
| QcMsg::AdminStatus | status(const QcMsg::AdminSample &sample, quint64 uptimeMs) const |
Static Public Members
| const QSet<QString> & | serverCategories() |
Detailed Description
Each fits the bounds of its message (QcMsg::AdminLimits).
Member Function Documentation
QcMsg::AdminCatalogue QcAdminReports::catalogue() const
Returns every command with its group and names (at most AdminLimits::maxNames, logged once per command when cut).
std::array<quint32, QcEntityKinds::count> QcAdminReports::entitiesByKind() const
Returns the entities of the world by kind, all of them.
QcMsg::AdminLists QcAdminReports::lists() const
Returns the access lists: whether the whitelist is on, the operators, the whitelist and the bans (each cut to AdminLimits::maxEntries).
QcAdminReports::Log QcAdminReports::log(QcMsg::AdminLogLine::Level level, qsizetype count, quint64 after, bool tail) const
Returns the newest log lines of at least level after the line numbered after, at most count (and at most AdminLimits::maxLogLines); tail marks them as a tail that replaces what the client shows. A server in the game's process (QcServerConfig::fullAdminLog off) shows only the categories of the server (serverCategories()): the rest of the process's log is the host's game.
QcMsg::AdminPlayers QcAdminReports::players(const QHash<quint32, qint32> &pings) const
Returns everyone playing; pings holds the latest round trip by entity id.
[static] const QSet<QString> &QcAdminReports::serverCategories()
Returns the logging categories of the server's side: commands, admin, game modes, items, lag, network, plants, server, trades, world generation.
QcMsg::AdminSettings QcAdminReports::settings() const
Returns the game rules with their values in this world and the server limits with their defaults and current values, and whether the limits come from the server.
QcMsg::AdminStatus QcAdminReports::status(const QcMsg::AdminSample &sample, quint64 uptimeMs) const
Returns the status around sample, with the server's uptime uptimeMs.