Game now kicks players if they access ping.php and get an error message
This commit is contained in:
parent
af6f4c1bce
commit
46cb98aa7c
@ -201,11 +201,11 @@ function pingServer() {
|
||||
if (lockGot && gpsaccuracy < requiredaccuracy) {
|
||||
$.getJSON(mkApiUrl('ping') + "?user=" + username + "&lat=" + latitude + "&long=" + longitude, function (data) {
|
||||
if (data.status == "ERROR") {
|
||||
navigator.notification.alert("Your account status has changed, and you have been logged out. Reason: " + data.message, "Account Status Changed", "OK");
|
||||
localStorage.setItem("no_autologin", true);
|
||||
localStorage.setItem("no_autologin", "true");
|
||||
username = null;
|
||||
password = null;
|
||||
openscreen('login');
|
||||
document.location.href = "index.html";
|
||||
navigator.notification.alert("Your session status has changed, and you have been logged out. \n\nReason: " + data.message, null, "Sign-in Status Changed", "OK");
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -240,4 +240,13 @@ setInterval(pingServer, 5000);
|
||||
// Show error if it's taking too long
|
||||
setTimeout(function () {
|
||||
onError();
|
||||
}, 15 * 1000);
|
||||
}, 15 * 1000);
|
||||
|
||||
setTimeout(function () {
|
||||
// GPS lock is taking too long, let's GTFO of the loading screen
|
||||
$('#loading').fadeOut('slow', function () {
|
||||
$('#no-lock').css('display', 'block');
|
||||
$('#loading').css('display', 'none');
|
||||
updateStatusBarColor();
|
||||
});
|
||||
}, 30 * 1000);
|
@ -108,7 +108,7 @@
|
||||
passset = true;
|
||||
}
|
||||
|
||||
if (userset && passset && localStorage.getItem("no_autologin") !== true) {
|
||||
if (userset && passset && localStorage.getItem("no_autologin") !== "true") {
|
||||
// Try to login with stored credentials
|
||||
$.post("https://sso.netsyms.com/api/simpleauth.php",
|
||||
{user: localStorage.getItem("username"), pass: localStorage.getItem("password")},
|
||||
@ -126,7 +126,7 @@
|
||||
} else {
|
||||
$('#loading').css('display', 'none');
|
||||
// Remove autologin block
|
||||
localStorage.setItem("no_autologin", false);
|
||||
localStorage.setItem("no_autologin", "");
|
||||
updateStatusBarColor();
|
||||
}
|
||||
navigator.splashscreen.hide();
|
||||
|
Reference in New Issue
Block a user