From c7a4e61d6134e6fdaad36f1d8e24411fc1f8f83f Mon Sep 17 00:00:00 2001 From: lotodore Date: Mon, 2 Jan 2012 10:42:35 +0000 Subject: [PATCH] Fixing network game (ticket #90). --- src/net/common/serverlobbythread.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 8755d5b5..1ec2ca65 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1493,17 +1493,17 @@ ServerLobbyThread::EstablishSession(boost::shared_ptr session) InternalRemovePlayer(rejoinPlayerId, ERR_NET_PLAYER_NAME_IN_USE); } else { // Check whether this player is already connected. -#ifdef POKERTH_OFFICIAL_SERVER - // If so, and this is a login server, disconnect the already connected player. unsigned previousPlayerId = GetPlayerId(session->GetPlayerData()->GetName()); if (previousPlayerId != 0) { +#ifdef POKERTH_OFFICIAL_SERVER + // If so, and this is a login server, disconnect the already connected player. InternalRemovePlayer(previousPlayerId, ERR_NET_PLAYER_NAME_IN_USE); - } #else - // If this is a server without password protection, close this new session and return. - SessionError(session, ERR_NET_PLAYER_NAME_IN_USE); - return; + // If this is a server without password protection, close this new session and return. + SessionError(session, ERR_NET_PLAYER_NAME_IN_USE); + return; #endif + } } // Run postlogin for DB