- added privacy setting for country indicator. Add this to glestuser.ini to hide your country when hosting:

PrivacyPlease=true
This commit is contained in:
Mark Vejvoda 2011-01-25 22:55:53 +00:00
parent e15c5b48e3
commit 909d36e457
3 changed files with 12 additions and 1 deletions

View File

@ -1841,6 +1841,7 @@ void MenuStateCustomGame::publishToMasterserver()
string externalport = config.getString("MasterServerExternalPort", "61357");
publishToServerInfo["externalconnectport"] = externalport;
publishToServerInfo["privacyPlease"] = config.getBool("PrivacyPlease","false");
publishToServerInfo["gameStatus"] = intToStr(game_status_waiting_for_players);
if(slotCountHumans <= slotCountConnectedPlayers) {

View File

@ -1418,6 +1418,7 @@ std::map<string,string> ServerInterface::publishToMasterserver() {
publishToServerInfo["connectedClients"] = intToStr(slotCountConnectedPlayers);
string externalport = config.getString("MasterServerExternalPort", "61357");
publishToServerInfo["externalconnectport"] = externalport;
publishToServerInfo["privacyPlease"] = config.getBool("PrivacyPlease","false");
publishToServerInfo["gameStatus"] = intToStr(game_status_in_progress);
if(publishToMasterserverThread == NULL) {

View File

@ -172,7 +172,16 @@
else // connection to game server succeeded, protocol verification succeeded
{ // add this game server to the database
if ( extension_loaded('geoip') ) {
$country = geoip_country_code_by_name( $remote_ip );
$privacyPlease = 0;
if(isset($_GET["privacyPlease"])) {
$privacyPlease = (int) clean_str( $_GET['privacyPlease'] );
}
if($privacyPlease != 0)
{
$country = geoip_country_code_by_name( $remote_ip );
}
}
mysql_db_query( MYSQL_DATABASE, 'INSERT INTO glestserver SET ' .
'glestVersion=\'' . mysql_real_escape_string( $glestVersion ) . '\', ' .