saving real data incl ip now
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
virtual void AsyncCreateGame(unsigned requestId, const std::string &gameName);
|
||||
virtual void SetGamePlayerPlace(unsigned requestId, DB_id playerId, unsigned place);
|
||||
virtual void SetPlayerLastGames(unsigned requestId, DB_id playerId, std::vector<long> lastGames);
|
||||
virtual void SetPlayerLastGames(unsigned requestId, DB_id playerId, std::vector<long> lastGames, std::string playerIp);
|
||||
virtual void EndGame(unsigned requestId);
|
||||
|
||||
virtual void AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id reportedPlayerId, const std::string &avatarHash, const std::string &avatarType, DB_id *byPlayerId);
|
||||
|
||||
Reference in New Issue
Block a user