active block handling fixed

This commit is contained in:
Kai Philipp
2019-09-13 15:53:32 +02:00
parent cab243d978
commit c3ecf794d8
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -52,8 +52,8 @@ AsyncDBAuth::HandleResult(mysqlpp::Query &/*query*/, DBIdManager& /*idManager*/,
service.post(boost::bind(&ServerDBCallback::PlayerLoginFailed, &cb, GetId()));
} else {
int blocked = result[0][2];
//int active = result[0][5];
if (/*(active != 1) ||*/ (blocked != 0)) {
int active = result[0][7];
if ((active != 1) || (blocked != 0)) {
service.post(boost::bind(&ServerDBCallback::PlayerLoginBlocked, &cb, GetId()));
} else {
mysqlpp::String secret(result[0][1]);
+1 -1
View File
@@ -463,7 +463,7 @@ ServerDBThread::EstablishDBConnection()
*/
prepareNick
<< "PREPARE " QUERY_NICK_PREPARE " FROM " << mysqlpp::quote
<< "SELECT " DB_TABLE_PLAYER_COL_ID ", AES_DECRYPT(" DB_TABLE_PLAYER_COL_PASSWORD ", ?), " DB_TABLE_PLAYER_COL_VALID ", TRIM(" DB_TABLE_PLAYER_COL_COUNTRY "), " DB_TABLE_PLAYER_COL_LASTLOGIN ", " DB_TABLE_PLAYER_COL_LASTGAMES ", " DB_TABLE_PLAYER_COL_LASTIP " FROM " DB_TABLE_PLAYER " WHERE " DB_TABLE_PLAYER_COL_USERNAME " = ?";
<< "SELECT " DB_TABLE_PLAYER_COL_ID ", AES_DECRYPT(" DB_TABLE_PLAYER_COL_PASSWORD ", ?), " DB_TABLE_PLAYER_COL_VALID ", TRIM(" DB_TABLE_PLAYER_COL_COUNTRY "), " DB_TABLE_PLAYER_COL_LASTLOGIN ", " DB_TABLE_PLAYER_COL_LASTGAMES ", " DB_TABLE_PLAYER_COL_LASTIP ", " DB_TABLE_PLAYER_COL_ACTIVE " FROM " DB_TABLE_PLAYER " WHERE " DB_TABLE_PLAYER_COL_USERNAME " = ?";
mysqlpp::Query prepareAvatarBlacklist = m_connData->conn.query();
prepareAvatarBlacklist
+1 -1
View File
@@ -1382,7 +1382,7 @@ ServerLobbyThread::HandleNetPacketCreateGame(boost::shared_ptr<SessionData> sess
} else if (!session->GetPlayerData()->IsPlayerAllowedToJoinCreateLimitRank()
// @TODO: uncomment in productive
/*&& tmpData.gameType != GAME_TYPE_RANKING*/ ) {
LOG_ERROR('not allowed due to ranklimit');
LOG_ERROR("not allowed due to ranklimit");
SendJoinGameFailed(session, gameId, NTF_NET_JOIN_GUEST_FORBIDDEN);
} else {
boost::shared_ptr<ServerGame> game(