From 58897ae78613c2448f3c4a562191d47274c8f21f Mon Sep 17 00:00:00 2001 From: lotodore Date: Sun, 14 Nov 2010 01:11:47 +0000 Subject: [PATCH] Multiple connections in one ranking game from localhost are allowed (for testing). --- src/net/common/serverlobbythread.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 853feebf..ad1cf152 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -65,6 +65,8 @@ #define SERVER_SESSION_ACTIVITY_TIMEOUT_SEC 1800 // 30 min, MUST be > SERVER_TIMEOUT_WARNING_REMAINING_SEC #define SERVER_SESSION_FORCED_TIMEOUT_SEC 86400 // 1 day, should be quite large. +#define SERVER_ADDRESS_LOCALHOST_STR "::1" + #define SERVER_STATISTICS_FILE_NAME "server_statistics.log" #define SERVER_STATISTICS_STR_TOTAL_PLAYERS "TotalNumPlayersLoggedIn" #define SERVER_STATISTICS_STR_TOTAL_GAMES "TotalNumGamesCreated" @@ -1399,6 +1401,7 @@ ServerLobbyThread::HandleNetPacketJoinGame(SessionWrapper session, const std::st SendJoinGameFailed(session.sessionData, joinGame.gameId, NTF_NET_JOIN_INVALID_PASSWORD); } else if (tmpData.gameType == GAME_TYPE_RANKING + && session.sessionData->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR && game.IsClientAddressConnected(session.sessionData->GetClientAddr())) { SendJoinGameFailed(session.sessionData, joinGame.gameId, NTF_NET_JOIN_GAME_FULL);