- fix switched handling of privacyPlease in masetrserver code

This commit is contained in:
mnaumann 2011-01-27 03:04:34 +00:00
parent f0c6c1b0c5
commit 4cb50ca0ae
1 changed files with 12 additions and 7 deletions

View File

@ -10,6 +10,13 @@
$glestVersion = (string) clean_str( $_GET['glestVersion'] );
$platform = (string) clean_str( $_GET['platform'] );
$binaryCompileDate = (string) clean_str( $_GET['binaryCompileDate'] );
if ( isset( $_GET['privacyPlease'] ) ) {
$privacyPlease = (int) $_GET['privacyPlease'];
}
else
{
$privacyPlease = 0;
}
// game info:
$serverTitle = (string) clean_str( $_GET['serverTitle'] );
@ -171,18 +178,16 @@
*/
else // connection to game server succeeded, protocol verification succeeded
{ // add this game server to the database
$country = "";
if ( extension_loaded('geoip') ) {
$privacyPlease = 0;
if(isset($_GET["privacyPlease"])) {
$privacyPlease = (int) clean_str( $_GET['privacyPlease'] );
}
if($privacyPlease != 0)
if ( $privacyPlease == 0 )
{
$country = geoip_country_code_by_name( $remote_ip );
}
else
{
$country = '';
}
}
mysql_query( 'INSERT INTO glestserver SET ' .
'glestVersion=\'' . mysql_real_escape_string( $glestVersion ) . '\', ' .