mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
user banning
This commit is contained in:
parent
6145d6d524
commit
57f9e2c3b4
27 changed files with 220 additions and 37 deletions
|
|
@ -583,6 +583,14 @@ public:
|
|||
static SerializableItem *newItem() { return new Event_ServerMessage; }
|
||||
int getItemId() const { return ItemId_Event_ServerMessage; }
|
||||
};
|
||||
class Event_ConnectionClosed : public GenericEvent {
|
||||
Q_OBJECT
|
||||
public:
|
||||
Event_ConnectionClosed(const QString &_reason = QString());
|
||||
QString getReason() const { return static_cast<SerializableItem_String *>(itemMap.value("reason"))->getData(); };
|
||||
static SerializableItem *newItem() { return new Event_ConnectionClosed; }
|
||||
int getItemId() const { return ItemId_Event_ConnectionClosed; }
|
||||
};
|
||||
class Event_Message : public GenericEvent {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
@ -675,5 +683,14 @@ public:
|
|||
static SerializableItem *newItem() { return new Command_UpdateServerMessage; }
|
||||
int getItemId() const { return ItemId_Command_UpdateServerMessage; }
|
||||
};
|
||||
class Command_BanFromServer : public AdminCommand {
|
||||
Q_OBJECT
|
||||
public:
|
||||
Command_BanFromServer(const QString &_userName = QString(), int _minutes = -1);
|
||||
QString getUserName() const { return static_cast<SerializableItem_String *>(itemMap.value("user_name"))->getData(); };
|
||||
int getMinutes() const { return static_cast<SerializableItem_Int *>(itemMap.value("minutes"))->getData(); };
|
||||
static SerializableItem *newItem() { return new Command_BanFromServer; }
|
||||
int getItemId() const { return ItemId_Command_BanFromServer; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue