This commit is contained in:
Kai Philipp
2019-09-14 21:50:14 +02:00
parent b628df6868
commit 289adcd743
3 changed files with 2 additions and 4 deletions
+1
View File
@@ -299,6 +299,7 @@ ServerGame::InternalStartGame()
if (playerData.size() >= 2) {
// Set DB Backend.
// @TODO: check for wec or bbc game with bbcbot as creator
//if (GetGameData().gameType == GAME_TYPE_RANKING)
if (true)
m_database = GetLobbyThread().GetDatabase();
-3
View File
@@ -1812,12 +1812,10 @@ ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData
if (tmpSession && tmpSession->GetPlayerData()) {
tmpSession->GetPlayerData()->SetDBId(dbPlayerData.id);
tmpSession->GetPlayerData()->SetCountry(dbPlayerData.country);
if(dbPlayerData.last_games.length() > 0){
LOG_ERROR("last_games from db = " << dbPlayerData.last_games);
vector<string> last_games;
boost::split(last_games, dbPlayerData.last_games, boost::is_any_of(","));
for (int i = 0; i < last_games.size(); i++){
if(last_games[i].length() > 0)
tmpSession->GetPlayerData()->AddPlayerLastGame(stol(last_games[i]));
@@ -1826,7 +1824,6 @@ ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData
}else{
LOG_ERROR("no lastGames from db");
}
this->AuthChallenge(tmpSession, dbPlayerData.secret);
}
}
+1 -1
View File
@@ -291,7 +291,7 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
count++;
}else{
LOG_ERROR("erasing overdued timestamp " << *timeStamp);
timeStamp = m_last_games.erase(m_last_games.begin() + i); // erase overdued entries
timeStamp = m_last_games.erase(i); // erase overdued entries
}
i++;
}