Merge pull request #1354 from Cockatrice/fix-1351

Fix #1351 - Server ignores only-reg if in "none" auth mode.
This commit is contained in:
Zach 2015-08-21 22:15:32 -04:00
commit a6a62b3334
4 changed files with 12 additions and 2 deletions

View file

@ -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());