error msg

This commit is contained in:
Kai Philipp
2019-09-15 18:11:36 +02:00
parent 9e359ae749
commit 0e0a8fddd8
+2 -2
View File
@@ -1383,7 +1383,7 @@ ServerLobbyThread::HandleNetPacketCreateGame(boost::shared_ptr<SessionData> sess
// @TODO: uncomment in productive // @TODO: uncomment in productive
/*&& tmpData.gameType != GAME_TYPE_RANKING*/ ) { /*&& tmpData.gameType != GAME_TYPE_RANKING*/ ) {
LOG_ERROR("not allowed due to ranklimit"); LOG_ERROR("not allowed due to ranklimit");
SendJoinGameFailed(session, gameId, ERR_NET_PLAYER_BLOCKED); SendJoinGameFailed(session, gameId, NTF_NET_JOIN_GAME_NAME_IN_USE);
} else { } else {
boost::shared_ptr<ServerGame> game( boost::shared_ptr<ServerGame> game(
new ServerGame( new ServerGame(
@@ -1436,7 +1436,7 @@ ServerLobbyThread::HandleNetPacketJoinGame(boost::shared_ptr<SessionData> sessio
} 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 &&*/ !session->GetPlayerData()->IsPlayerAllowedToJoinCreateLimitRank(m_serverConfig.readConfigString("ServerLimitRankNum"), m_serverConfig.readConfigString("ServerLimitRankPeriod"))) { } else if (/*tmpData.gameType == GAME_TYPE_RANKING &&*/ !session->GetPlayerData()->IsPlayerAllowedToJoinCreateLimitRank(m_serverConfig.readConfigString("ServerLimitRankNum"), m_serverConfig.readConfigString("ServerLimitRankPeriod"))) {
SendJoinGameFailed(session, joinGame.gameid(), ERR_NET_PLAYER_BLOCKED); SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_GAME_NAME_IN_USE);
// } else if (tmpData.gameType == GAME_TYPE_RANKING && !joinGame.spectateonly() // } else if (tmpData.gameType == GAME_TYPE_RANKING && !joinGame.spectateonly()
// && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR // && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR
// && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4V6 // && session->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4V6