mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
Fix #1351 - Server ignores only-reg if in "none" auth mode.
When in none auth mode, registered users don't exist; hence the setting
makes the game impossible to join.
Normally the setting would be greyed out when the user is unregistered,
but commit 475c54bf introduced a new edge case where the stored setting
would apply to the field even if the user is unregistered, making the
setting possible to apply in no-reg mode. Regardless, any client could
have done this, not just the default cockatrice.
The server side fix should prevent all issues in the future.
This commit is contained in:
parent
ea9e966330
commit
6170c9037f
4 changed files with 12 additions and 2 deletions
|
|
@ -114,7 +114,13 @@ DlgCreateGame::DlgCreateGame(TabRoom *_room, const QMap<int, QString> &_gameType
|
|||
descriptionEdit->setText(settingsCache->getGameDescription());
|
||||
maxPlayersEdit->setValue(settingsCache->getMaxPlayers());
|
||||
onlyBuddiesCheckBox->setChecked(settingsCache->getOnlyBuddies());
|
||||
onlyRegisteredCheckBox->setChecked(settingsCache->getOnlyRegistered());
|
||||
if (room && room->getUserInfo()->user_level() & ServerInfo_User::IsRegistered)
|
||||
{
|
||||
onlyRegisteredCheckBox->setChecked(settingsCache->getOnlyRegistered());
|
||||
} else {
|
||||
onlyBuddiesCheckBox->setEnabled(false);
|
||||
onlyRegisteredCheckBox->setEnabled(false);
|
||||
}
|
||||
spectatorsAllowedCheckBox->setChecked(settingsCache->getSpectatorsAllowed());
|
||||
spectatorsNeedPasswordCheckBox->setChecked(settingsCache->getSpectatorsNeedPassword());
|
||||
spectatorsCanTalkCheckBox->setChecked(settingsCache->getSpectatorsCanTalk());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue