mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-01 01:16:03 -04:00
fixed noobs' commits, this is mostly good except we need to add a config variable to the config for central
This commit is contained in:
@@ -2772,17 +2772,11 @@ void CentralServer::update()
|
||||
m_curTime = static_cast<uint32>(time(0));
|
||||
|
||||
// stella: Adding those for sending regular updates through WebAPI to the webserver
|
||||
std::string updateURL = "http://webdev/test/asdf/asdf"; //todo: add config vars to CentralServer config header and cpp
|
||||
|
||||
static int population=0;
|
||||
population = CentralServer::getInstance().getPlayerCount();
|
||||
std::string authURL(ConfigLoginServer::getExternalAuthUrl());
|
||||
|
||||
postBuf << "population=" << population;
|
||||
postData = std::string(postBuf.str());
|
||||
std::ostringstream postBuf;
|
||||
postBuf << "population=" << CentralServer::getInstance().getPlayerCount();
|
||||
|
||||
|
||||
|
||||
|
||||
// Tell the LoginServers if necessary
|
||||
if ((++loopCount > ConfigCentralServer::getUpdatePlayerCountFrequency()))
|
||||
{
|
||||
@@ -2790,11 +2784,9 @@ void CentralServer::update()
|
||||
|
||||
// Update the population on the server
|
||||
sendPopulationUpdateToLoginServer();
|
||||
webAPI::simplePost(authURL, postData, "");
|
||||
webAPI::simplePost(updateURL, std::string(postBuf.str()), "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( ConfigCentralServer::getAuctionEnabled() ) // allow auctions?
|
||||
{
|
||||
if ( m_pAuctionTransferClient == nullptr )
|
||||
@@ -2818,8 +2810,6 @@ void CentralServer::update()
|
||||
m_pAuctionTransferClient = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// check every 5th frame (one second roughly?)
|
||||
if( loopCount%5 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user