diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 18e19d0f1..da8b4377d 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -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) { diff --git a/source/glest_game/network/server_interface.cpp b/source/glest_game/network/server_interface.cpp index bea074435..20e70ccff 100644 --- a/source/glest_game/network/server_interface.cpp +++ b/source/glest_game/network/server_interface.cpp @@ -1418,6 +1418,7 @@ std::map 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) { diff --git a/source/masterserver/addServerInfo.php b/source/masterserver/addServerInfo.php index 19256d6f3..085677c51 100644 --- a/source/masterserver/addServerInfo.php +++ b/source/masterserver/addServerInfo.php @@ -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 ) . '\', ' .