mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-17 07:52:16 -07:00
Introduce additional checks for playerMenu shortcut activation when they are accessed by a judge, only activating them if the player is a local player.
Took 2 hours 7 minutes Took 17 minutes
This commit is contained in:
parent
d914667238
commit
be9636bea0
2 changed files with 13 additions and 6 deletions
|
|
@ -139,7 +139,14 @@ void PlayerMenu::retranslateUi()
|
||||||
void PlayerMenu::refreshShortcuts()
|
void PlayerMenu::refreshShortcuts()
|
||||||
{
|
{
|
||||||
if (shortcutsActive) {
|
if (shortcutsActive) {
|
||||||
setShortcutsActive();
|
// Judges get access to every player's menus but only want shortcuts to be set for their own.
|
||||||
|
if (player->getPlayerInfo()->getLocalOrJudge() && !player->getPlayerInfo()->getLocal()) {
|
||||||
|
setShortcutsInactive();
|
||||||
|
} else {
|
||||||
|
setShortcutsActive();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setShortcutsInactive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ idleclienttimeout=3600
|
||||||
; * password: require users to specify a common password to log in;
|
; * password: require users to specify a common password to log in;
|
||||||
; * sql: authenticate users against the "users" table of the database;
|
; * sql: authenticate users against the "users" table of the database;
|
||||||
; Please note that only the "sql" method permits to have registered users and store their data on the server.
|
; Please note that only the "sql" method permits to have registered users and store their data on the server.
|
||||||
method=none
|
method=sql
|
||||||
|
|
||||||
; if the chosen authentication method is password, here you can define the password your users will use to log in
|
; if the chosen authentication method is password, here you can define the password your users will use to log in
|
||||||
password=123456
|
password=123456
|
||||||
|
|
@ -154,15 +154,15 @@ minpasswordlength = 6
|
||||||
|
|
||||||
; Servatrice can process registration requests to add new users on the fly.
|
; Servatrice can process registration requests to add new users on the fly.
|
||||||
; Enable this feature? Default false.
|
; Enable this feature? Default false.
|
||||||
;enabled=false
|
enabled=true
|
||||||
|
|
||||||
; Require users to provide an email address in order to register. Default true.
|
; Require users to provide an email address in order to register. Default true.
|
||||||
;requireemail=true
|
requireemail=false
|
||||||
|
|
||||||
; Require email activation. Newly registered users will receive an activation token by email,
|
; Require email activation. Newly registered users will receive an activation token by email,
|
||||||
; and will be required to input back this token on cockatrice at the first login to get their
|
; and will be required to input back this token on cockatrice at the first login to get their
|
||||||
; account activated. Default true.
|
; account activated. Default true.
|
||||||
;requireemailactivation=true
|
requireemailactivation=false
|
||||||
|
|
||||||
; Set this number to the maximum number of accounts any one user can use to create new accounts
|
; Set this number to the maximum number of accounts any one user can use to create new accounts
|
||||||
; using the same email address. 0 = Unlimited number of accounts (default).
|
; using the same email address. 0 = Unlimited number of accounts (default).
|
||||||
|
|
@ -255,7 +255,7 @@ body="Hi %username, thank our for registering on our Cockatrice server\r\nHere's
|
||||||
; Database type. Valid values are:
|
; Database type. Valid values are:
|
||||||
; * none: no database;
|
; * none: no database;
|
||||||
; * mysql: mysql or compatible database;
|
; * mysql: mysql or compatible database;
|
||||||
type=none
|
type=mysql
|
||||||
|
|
||||||
; Prefix used in he database for table names; default is cockatrice
|
; Prefix used in he database for table names; default is cockatrice
|
||||||
prefix=cockatrice
|
prefix=cockatrice
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue