if else clause turn-around
This commit is contained in:
@@ -1427,17 +1427,15 @@ ServerLobbyThread::HandleNetPacketJoinGame(boost::shared_ptr<SessionData> sessio
|
|||||||
SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_NOT_INVITED);
|
SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_NOT_INVITED);
|
||||||
} else if (!game->CheckPassword(password)) {
|
} else if (!game->CheckPassword(password)) {
|
||||||
SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_INVALID_PASSWORD);
|
SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_INVALID_PASSWORD);
|
||||||
} else if (tmpData.gameType == GAME_TYPE_RANKING) {
|
} else if (tmpData.gameType == GAME_TYPE_RANKING && !session->IsPlayerAllowedToJoinLimitRank()) {
|
||||||
if(!joinGame.spectateonly()
|
SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_GUEST_FORBIDDEN);
|
||||||
// && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR
|
} else if (tmpData.gameType == GAME_TYPE_RANKING && !joinGame.spectateonly()
|
||||||
// && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4V6
|
// && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR
|
||||||
// && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4
|
// && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4V6
|
||||||
// && game->IsClientAddressConnected(session->GetClientAddr())) {
|
// && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4
|
||||||
){
|
// && game->IsClientAddressConnected(session->GetClientAddr())) {
|
||||||
SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_IP_BLOCKED);
|
){
|
||||||
}else if (!session->IsPlayerAllowedToJoinLimitRank()) {
|
SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_IP_BLOCKED);
|
||||||
SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_GAME_INVALID);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
MoveSessionToGame(game, session, joinGame.autoleave(), false);
|
MoveSessionToGame(game, session, joinGame.autoleave(), false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user