kick users out of games

This commit is contained in:
Max-Wilhelm Bruker 2011-03-03 17:05:44 +01:00
parent d6083a85c7
commit 731dfcad5c
13 changed files with 263 additions and 86 deletions

View file

@ -141,6 +141,14 @@ public:
static SerializableItem *newItem() { return new Command_JoinGame; }
int getItemId() const { return ItemId_Command_JoinGame; }
};
class Command_KickFromGame : public GameCommand {
Q_OBJECT
public:
Command_KickFromGame(int _gameId = -1, int _playerId = -1);
int getPlayerId() const { return static_cast<SerializableItem_Int *>(itemMap.value("player_id"))->getData(); };
static SerializableItem *newItem() { return new Command_KickFromGame; }
int getItemId() const { return ItemId_Command_KickFromGame; }
};
class Command_LeaveGame : public GameCommand {
Q_OBJECT
public:
@ -403,6 +411,13 @@ public:
static SerializableItem *newItem() { return new Event_GameClosed; }
int getItemId() const { return ItemId_Event_GameClosed; }
};
class Event_Kicked : public GameEvent {
Q_OBJECT
public:
Event_Kicked(int _playerId = -1);
static SerializableItem *newItem() { return new Event_Kicked; }
int getItemId() const { return ItemId_Event_Kicked; }
};
class Event_Shuffle : public GameEvent {
Q_OBJECT
public: