Smarter rooms (#2484)

* Added VIP only room

* Added DONATOR room.

* Extended Room to include privilege level.

* Updated room join logic

* Updated server tab permissions column display based on perm+privlevel definitions

* Fixed new client -> old server blank permissions column on server tab

Added the ability for registered user - VIP/DONATOR/PRIVILEGED room.
This commit is contained in:
woogerboy21 2017-03-22 21:45:16 -04:00 committed by Zach H
parent 317ac05919
commit 2f23a9cb2f
12 changed files with 79 additions and 33 deletions

View file

@ -35,6 +35,7 @@ private:
QString name;
QString description;
QString permissionLevel;
QString privilegeLevel;
bool autoJoin;
QString joinMessage;
QStringList gameTypes;
@ -49,13 +50,15 @@ public:
mutable QReadWriteLock usersLock;
mutable QReadWriteLock gamesLock;
mutable QReadWriteLock historyLock;
Server_Room(int _id, int _chatHistorySize, const QString &_name, const QString &_description, const QString &_permissionLevel, bool _autoJoin, const QString &_joinMessage, const QStringList &_gameTypes, Server *parent );
Server_Room(int _id, int _chatHistorySize, const QString &_name, const QString &_description, const QString &_permissionLevel, const QString &_privilegeLevel, bool _autoJoin, const QString &_joinMessage, const QStringList &_gameTypes, Server *parent );
~Server_Room();
int getId() const { return id; }
QString getName() const { return name; }
QString getDescription() const { return description; }
QString getRoomPermission() const { return permissionLevel; }
QString getRoomPrivilege() const { return privilegeLevel; }
bool getAutoJoin() const { return autoJoin; }
bool userMayJoin(const ServerInfo_User &userInfo);
QString getJoinMessage() const { return joinMessage; }
const QStringList &getGameTypes() const { return gameTypes; }
const QMap<int, Server_Game *> &getGames() const { return games; }