needs QA/TEST before even seeing TC - implement login based on returned username from web api

This commit is contained in:
DarthArgus
2016-08-04 21:36:55 +00:00
parent 37e50708b7
commit 91cd9b60ec
4 changed files with 31 additions and 56 deletions
@@ -2864,13 +2864,14 @@ void CentralServer::sendPopulationUpdateToLoginServer()
sendToAllLoginServers(upm);
}
// TODO: make this togglable on/off in a config setting
void CentralServer::sendMetricsToWebAPI(std::string updateURL)
{
std::ostringstream postBuf;
postBuf << "totalPlayerCount=" << m_totalPlayerCount << "&totalGameServers=" << m_gameServers.size() - 1 << "&totalPlanetServers=" << m_planetServers.size() << "&isPublic=" << getIsClusterPublic() << "&isLocked=" << getIsClusterLocked() << "&isSecret=" << getIsClusterSecret() << "&preloadFinished=" << getClusterStartupTime() << "&databasebacklogged=" << isDatabaseBacklogged() << "&totalTutorialSceneCount=" << m_totalTutorialSceneCount << "&totalFalconSceneCount=" << m_totalFalconSceneCount;
std::string response = webAPI::simplePost(updateURL, std::string(postBuf.str()), "");
std::string response = webAPI::simplePost(updateURL, std::string(postBuf.str()), "status", "message");
WARNING((response != "success"), ("Error sending stats: %s", response.c_str()));
}