saving real data incl ip now

This commit is contained in:
Kai Philipp
2019-09-11 20:13:43 +02:00
parent 7cda99e881
commit ff4c2c5302
7 changed files with 14 additions and 13 deletions
+6 -4
View File
@@ -235,15 +235,17 @@ ServerDBThread::SetGamePlayerPlace(unsigned requestId, DB_id playerId, unsigned
}
void
ServerDBThread::SetPlayerLastGames(unsigned requestId, DB_id playerId, std::vector<long> lastGames)
ServerDBThread::SetPlayerLastGames(unsigned requestId, DB_id playerId, std::vector<long> lastGames, std::string playerIp)
{
LOG_ERROR("ServerDBThread::SetPlayerLastGames() entered.");
string lastGamesFieldValue = "1,2,3";
string lastIp = "127.0.0.1";
std::ostringstream oss;
std::copy(lastGames.begin(), lastGames.end(), std::ostream_iterator<int>(oss, ";"));
std::string lastGamesFieldValue( oss.str() );
list<string> params;
ostringstream paramStream;
params.push_back(lastGamesFieldValue);
params.push_back(lastIp);
params.push_back(playerIp);
paramStream << playerId;
params.push_back(paramStream.str());
boost::shared_ptr<AsyncDBQuery> asyncQuery(