QtCraft API C++ classes QML types Handbook

QcMsg::AdminResult Struct

struct QcMsg::AdminResult

Server -> client: the outcome of an AdminRequest (id 0 answers a subscription or ends it), with the command's replies as chat lines. More...

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

Public Types

enum class Refusal { None, Rights, Arguments, Confirmation, TooSoon }

Public Variables

quint32 id
QList<QcMsg::ChatMessage> lines
bool ok
QcMsg::AdminResult::Refusal refusal

Static Public Members

const quint8 refusalCount

Detailed Description

A refusal has ok false and says why: the player is no operator (any subscription has ended then too), the arguments do not fit, stopping needs the confirmation, or the request came again too soon.

Member Type Documentation

enum class AdminResult::Refusal

Why a request was refused.

ConstantValueDescription
QcMsg::AdminResult::Refusal::None0Not refused.
QcMsg::AdminResult::Refusal::Rights1The player is no operator.
QcMsg::AdminResult::Refusal::Arguments2The arguments do not fit the request.
QcMsg::AdminResult::Refusal::Confirmation3Stopping needs the argument "confirm".
QcMsg::AdminResult::Refusal::TooSoon4The request came again too soon (the log's tail: at most once a second).

Member Variable Documentation

quint32 AdminResult::id

The id of the AdminRequest answered; 0 for a subscription.

QList<QcMsg::ChatMessage> AdminResult::lines

The command's replies, or the reason of a refusal.

bool AdminResult::ok

Whether the request was carried out.

QcMsg::AdminResult::Refusal AdminResult::refusal

Why the request was refused; None when it was not.

const quint8 AdminResult::refusalCount

The number of refusals.