mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Judge mode (#3531)
* Judge mode * Use seperate judge icon * Fix clang init ordering complaint * Create gavel.svg * Add judge level * Adjust judge permissions. * - Tag events caused by judges - Allow judges access to card right click menus. * Allow judges to change phase / turn. * Remove gavel from pawn * Make judge action text black. * Create scales * Rename scales to scales.svg * Use scales * remove gavel * - Address PR feedback - Fix sort order * Zach * add option to servatrice.ini
This commit is contained in:
parent
9d27b36704
commit
ea8201af5c
42 changed files with 375 additions and 105 deletions
|
|
@ -549,10 +549,14 @@ ServerInfo_User Servatrice_DatabaseInterface::evalUserQueryResult(const QSqlQuer
|
|||
|
||||
const int is_admin = query->value(2).toInt();
|
||||
int userLevel = ServerInfo_User::IsUser | ServerInfo_User::IsRegistered;
|
||||
if (is_admin == 1)
|
||||
if (is_admin & 1)
|
||||
userLevel |= ServerInfo_User::IsAdmin | ServerInfo_User::IsModerator;
|
||||
else if (is_admin == 2)
|
||||
else if (is_admin & 2)
|
||||
userLevel |= ServerInfo_User::IsModerator;
|
||||
|
||||
if (is_admin & 4)
|
||||
userLevel |= ServerInfo_User::IsJudge;
|
||||
|
||||
result.set_user_level(userLevel);
|
||||
|
||||
const QString country = query->value(3).toString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue