From fb9a1a87811c8d62e39ede158febd8b1c04d4941 Mon Sep 17 00:00:00 2001 From: Kai Philipp Date: Sun, 15 Sep 2019 17:34:16 +0200 Subject: [PATCH] bugfix --- src/net/common/serverlobbythread.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 2b3805e1..51505a9d 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1379,11 +1379,11 @@ ServerLobbyThread::HandleNetPacketCreateGame(boost::shared_ptr sess SendJoinGameFailed(session, gameId, NTF_NET_JOIN_GUEST_FORBIDDEN); } else if (!ServerGame::CheckSettings(tmpData, password, GetServerMode())) { SendJoinGameFailed(session, gameId, NTF_NET_JOIN_INVALID_SETTINGS); - } else if (!session->GetPlayerData()->IsPlayerAllowedToJoinCreateLimitRank(m_serverConfig.readConfigString("ServerLimitRankNum"), ), m_serverConfig.readConfigString("ServerLimitRankPeriod"))) + } else if (!session->GetPlayerData()->IsPlayerAllowedToJoinCreateLimitRank(m_serverConfig.readConfigString("ServerLimitRankNum"), m_serverConfig.readConfigString("ServerLimitRankPeriod"))) // @TODO: uncomment in productive /*&& tmpData.gameType != GAME_TYPE_RANKING*/ ) { LOG_ERROR("not allowed due to ranklimit"); - SendJoinGameFailed(session, gameId, NTF_NET_JOIN_GUEST_FORBIDDEN); + SendJoinGameFailed(session, gameId, NTF_NET_JOIN_GAME_INVALID); } else { boost::shared_ptr game( new ServerGame( @@ -1435,8 +1435,8 @@ ServerLobbyThread::HandleNetPacketJoinGame(boost::shared_ptr sessio SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_NOT_INVITED); } else if (!game->CheckPassword(password)) { SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_INVALID_PASSWORD); - } else if (/*tmpData.gameType == GAME_TYPE_RANKING &&*/ !session->GetPlayerData()->IsPlayerAllowedToJoinCreateLimitRank(m_serverConfig.readConfigString("ServerLimitRankNum"), ), m_serverConfig.readConfigString("ServerLimitRankPeriod")))) { - SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_GUEST_FORBIDDEN); + } else if (/*tmpData.gameType == GAME_TYPE_RANKING &&*/ !session->GetPlayerData()->IsPlayerAllowedToJoinCreateLimitRank(m_serverConfig.readConfigString("ServerLimitRankNum"), m_serverConfig.readConfigString("ServerLimitRankPeriod"))) { + SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_GAME_INVALID); // } else if (tmpData.gameType == GAME_TYPE_RANKING && !joinGame.spectateonly() // && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR // && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4V6