Fixing network game (ticket #90).

This commit is contained in:
lotodore
2012-01-02 10:42:35 +00:00
parent de91b54619
commit c7a4e61d61
+3 -3
View File
@@ -1493,18 +1493,18 @@ ServerLobbyThread::EstablishSession(boost::shared_ptr<SessionData> session)
InternalRemovePlayer(rejoinPlayerId, ERR_NET_PLAYER_NAME_IN_USE); InternalRemovePlayer(rejoinPlayerId, ERR_NET_PLAYER_NAME_IN_USE);
} else { } else {
// Check whether this player is already connected. // 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()); unsigned previousPlayerId = GetPlayerId(session->GetPlayerData()->GetName());
if (previousPlayerId != 0) { 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); InternalRemovePlayer(previousPlayerId, ERR_NET_PLAYER_NAME_IN_USE);
}
#else #else
// If this is a server without password protection, close this new session and return. // If this is a server without password protection, close this new session and return.
SessionError(session, ERR_NET_PLAYER_NAME_IN_USE); SessionError(session, ERR_NET_PLAYER_NAME_IN_USE);
return; return;
#endif #endif
} }
}
// Run postlogin for DB // Run postlogin for DB
string tmpAvatarHash; string tmpAvatarHash;