From 89a40325dcef7e51e8a70a55e40f6d97625c29e2 Mon Sep 17 00:00:00 2001 From: Kai Philipp Date: Sun, 27 Nov 2016 16:03:16 +0100 Subject: [PATCH] temporarily disabled ip-check for entering ranking games --- src/net/common/serverlobbythread.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index ee19962b..0b9e5dd4 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1397,6 +1397,7 @@ 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); + /* @FIXME: temporary disabling ip-check for entering ranking-games } else if (tmpData.gameType == GAME_TYPE_RANKING && !joinGame.spectateonly() && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR @@ -1404,6 +1405,13 @@ ServerLobbyThread::HandleNetPacketJoinGame(boost::shared_ptr sessio && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4 && game->IsClientAddressConnected(session->GetClientAddr())) { SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_IP_BLOCKED); + */ + } else if (tmpData.gameType == GAME_TYPE_RANKING + && !joinGame.spectateonly() + && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR + && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4V6 + && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4) { + SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_IP_BLOCKED); } else { MoveSessionToGame(game, session, joinGame.autoleave(), false); }