From 7303d235a07839fc5c3263dfd148291df3a347eb Mon Sep 17 00:00:00 2001 From: Kai Philipp Date: Sat, 14 Sep 2019 18:14:34 +0200 Subject: [PATCH] bugfix string split --- src/net/common/serverlobbythread.cpp | 13 ------------- src/playerdata.cpp | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 8bf7255f..6210a704 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1821,19 +1821,6 @@ LOG_ERROR("last_games from db = " << dbPlayerData.last_games); if(last_games[i].length() > 0) tmpSession->GetPlayerData()->AddPlayerLastGame(stol(last_games[i])); } - - - - // std::stringstream ss(dbPlayerData.last_games); - // for (string i; ss >> i;) { - // if(i.length() > 0){ - // LOG_ERROR("adding lastGame " << i); - // tmpSession->GetPlayerData()->AddPlayerLastGame(stol(i)); - // } - // if (ss.peek() == ',') - // ss.ignore(); - // } - //tmpSession->GetPlayerData()->SetPlayerLastGames(last_games); LOG_ERROR("last_games last from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames().back()); this->AuthChallenge(tmpSession, dbPlayerData.secret); } diff --git a/src/playerdata.cpp b/src/playerdata.cpp index 737abf04..c60df632 100644 --- a/src/playerdata.cpp +++ b/src/playerdata.cpp @@ -291,7 +291,7 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() "); count++; }else{ LOG_ERROR("erasing overdued timestamp " << *timeStamp); - m_last_games.erase(m_last_games.begin() + i); // erase overdued entries + //m_last_games.erase(m_last_games.begin() + i); // erase overdued entries } i++; }