mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 00:53:57 -07:00
changed leave game shortcut, server cleanups, added max_games_per_user
This commit is contained in:
parent
d0b8c6ebd9
commit
38b31681e2
11 changed files with 85 additions and 64 deletions
|
|
@ -18,8 +18,6 @@ class Server_Room : public QObject, public QList<Server_ProtocolHandler *> {
|
|||
Q_OBJECT
|
||||
signals:
|
||||
void roomInfoChanged();
|
||||
void gameCreated(Server_Game *game);
|
||||
void gameClosing(int gameId);
|
||||
private:
|
||||
int id;
|
||||
QString name;
|
||||
|
|
@ -28,8 +26,6 @@ private:
|
|||
QString joinMessage;
|
||||
QStringList gameTypes;
|
||||
QMap<int, Server_Game *> games;
|
||||
private slots:
|
||||
void removeGame();
|
||||
public:
|
||||
mutable QMutex roomMutex;
|
||||
Server_Room(int _id, const QString &_name, const QString &_description, bool _autoJoin, const QString &_joinMessage, const QStringList &_gameTypes, Server *parent);
|
||||
|
|
@ -41,12 +37,14 @@ public:
|
|||
const QMap<int, Server_Game *> &getGames() const { return games; }
|
||||
Server *getServer() const;
|
||||
ServerInfo_Room *getInfo(bool complete) const;
|
||||
int getGamesCreatedByUser(const QString &name) const;
|
||||
|
||||
void addClient(Server_ProtocolHandler *client);
|
||||
void removeClient(Server_ProtocolHandler *client);
|
||||
void say(Server_ProtocolHandler *client, const QString &s);
|
||||
void broadcastGameListUpdate(Server_Game *game);
|
||||
Server_Game *createGame(const QString &description, const QString &password, int maxPlayers, const QList<int> &_gameTypes, bool onlyBuddies, bool onlyRegistered, bool spectatorsAllowed, bool spectatorsNeedPassword, bool spectatorsCanTalk, bool spectatorsSeeEverything, Server_ProtocolHandler *creator);
|
||||
void removeGame(Server_Game *game);
|
||||
|
||||
void sendRoomEvent(RoomEvent *event);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue