QtCraft API C++ classes QML types Handbook

QcMsg::AdminRequest Struct

struct QcMsg::AdminRequest

Client -> server: one request of the operator; the server answers with AdminResult (same id) and, for the readers and the changes of a list or setting, the report of that topic. More...

Header: #include <common/protocol/QcAdminMessages.h>

Public Types

enum class Kind { Catalogue, Players, Lists, Settings, LogTail, …, Stop }

Public Variables

QStringList arguments
quint32 id
QcMsg::AdminRequest::Kind kind

Static Public Members

const quint8 kindCount

Detailed Description

Member Type Documentation

enum class AdminRequest::Kind

The requests and their arguments.

ConstantValueDescription
QcMsg::AdminRequest::Kind::Catalogue0Asks for AdminCatalogue (no arguments).
QcMsg::AdminRequest::Kind::Players1Asks for AdminPlayers (no arguments).
QcMsg::AdminRequest::Kind::Lists2Asks for AdminLists (no arguments).
QcMsg::AdminRequest::Kind::Settings3Asks for AdminSettings (no arguments).
QcMsg::AdminRequest::Kind::LogTail4Asks for the log's tail as AdminLog: level, number of lines (both optional); at most once a second.
QcMsg::AdminRequest::Kind::Command5A command line as the operator typed it; the reply lines come back in AdminResult.
QcMsg::AdminRequest::Kind::Chat6A chat line to everyone as the server (/say).
QcMsg::AdminRequest::Kind::Kick7Kicks a player: name [reason].
QcMsg::AdminRequest::Kind::Ban8Bans a player: name [reason].
QcMsg::AdminRequest::Kind::Unban9Lifts a ban: name.
QcMsg::AdminRequest::Kind::Op10Gives a player operator rights: name.
QcMsg::AdminRequest::Kind::Deop11Takes a player's operator rights: name.
QcMsg::AdminRequest::Kind::WhitelistAdd12Adds a name to the whitelist: name.
QcMsg::AdminRequest::Kind::WhitelistRemove13Removes a name from the whitelist: name.
QcMsg::AdminRequest::Kind::Whitelist14Switches the whitelist: "on" or "off".
QcMsg::AdminRequest::Kind::SetRule15Sets a game rule: name, value.
QcMsg::AdminRequest::Kind::SetLimit16Sets a server limit: name, value ("default" resets it).
QcMsg::AdminRequest::Kind::Save17Saves the world (no arguments).
QcMsg::AdminRequest::Kind::Backup18Makes a backup of the world: [label].
QcMsg::AdminRequest::Kind::Stop19Stops only with the argument "confirm".

Member Variable Documentation

QStringList AdminRequest::arguments

The arguments of the kind (at most AdminLimits::maxArguments).

quint32 AdminRequest::id

The number the client picked; AdminResult answers with it.

QcMsg::AdminRequest::Kind AdminRequest::kind

What is asked.

const quint8 AdminRequest::kindCount

The number of request kinds.