Also check ranking game restrictions on server.

This commit is contained in:
lotodore
2010-08-01 20:15:49 +00:00
parent 002defcead
commit 9e039182ec
7 changed files with 44 additions and 7 deletions
+19
View File
@@ -837,6 +837,25 @@ ServerGame::CheckPassword(const string &password) const
return (password == m_password);
}
bool
ServerGame::CheckSettings(const GameData &data)
{
bool retVal = true;
if (data.gameType == GAME_TYPE_RANKING)
{
if ((data.startMoney != RANKING_GAME_START_CASH)
|| (data.maxNumberOfPlayers != RANKING_GAME_NUMBER_OF_PLAYERS)
|| (data.firstSmallBlind != RANKING_GAME_START_SBLIND)
|| (data.raiseIntervalMode != RAISE_ON_HANDNUMBER)
|| (data.raiseMode != DOUBLE_BLINDS)
|| (data.raiseSmallBlindEveryHandsValue != RANKING_GAME_RAISE_EVERY_HAND))
{
retVal = false;
}
}
return retVal;
}
GuiInterface &
ServerGame::GetGui()
{