botguard: first pass at full implementation. fingers crossed...

This commit is contained in:
Jon Atkins
2014-09-15 20:50:58 +01:00
parent bbbc3493c9
commit 92aae954a8
5 changed files with 23 additions and 11 deletions

View File

@ -34,6 +34,7 @@ window.postAjax = function(action, data, successCallback, errorCallback) {
var onSuccess = function(data, textStatus, jqXHR) {
window.requests.remove(jqXHR);
iitc_bg.process_response_params(action,data);
// the Niantic server can return a HTTP success, but the JSON response contains an error. handle that sensibly
if (data && data.error && data.error == 'out of date') {
@ -64,7 +65,7 @@ window.postAjax = function(action, data, successCallback, errorCallback) {
}
var versionStr = niantic_params.CURRENT_VERSION;
var post_data = JSON.stringify($.extend({}, data, {v: versionStr, b: "", c: ""}));
var post_data = JSON.stringify($.extend({}, data, {v: versionStr}, iitc_bg.extra_request_params(action)));
var result = $.ajax({
url: '/r/'+action,