add a function to query if a player guid is for a system special account (e.g. __ADA__ or __JARVIS__, possibly others in future too - NIAOPS?)

This commit is contained in:
Jon Atkins 2013-09-16 21:33:17 +01:00
parent 9b3caa8eb9
commit 7165acd30e
2 changed files with 17 additions and 2 deletions

View File

@ -16,7 +16,7 @@ var idlePoll = function() {
setInterval(idlePoll, IDLE_POLL_TIME*1000);
var idleReset = function () {
window.idleReset = function () {
// update immediately when the user comes back
if(isIdle()) {
window.idleTime = 0;
@ -28,7 +28,7 @@ var idleReset = function () {
window._idleTimeLimit = MAX_IDLE_TIME;
};
var idleSet = function() {
window.idleSet = function() {
// force IITC to idle. used by the mobile app when switching to something else
if (!isIdle()) {
window._idleTImeLimit = 0;

View File

@ -106,3 +106,18 @@ window.loadPlayerNamesForPortal = function(portal_details) {
if(reso) getPlayerName(reso.ownerGuid);
});
}
// test to see if a specific player GUID is a special system account (e.g. __JARVIS__, __ADA__) that shouldn't
// be listed as a player
window.isSystemPlayer = function(guid) {
switch (guid) {
case '00000000000000000000000000000001.c':
case '00000000000000000000000000000002.c':
return true;
default:
return false;
}
}