Fix online/offline timer

This commit is contained in:
Natsumi
2020-12-15 13:54:43 +13:00
committed by pypy
parent 1895da6958
commit 3cfecec5ad

View File

@@ -4073,18 +4073,17 @@ import gameLogService from './service/gamelog.js'
if ((ctx.ref.$offline_for == '') &&
((ctx.state == 'offline') && ctx.ref.state == '') ||
(((ctx.state == 'offline') || (ctx.state == 'active')) &&
((ctx.ref.state != 'offline') && (ctx.ref.state != 'active') && (ctx.ref.state != '')))) {
((ctx.ref.state == 'online')))) {
ctx.ref.$online_for = '';
ctx.ref.$offline_for = Date.now();
}
if ((ctx.ref.$online_for == '') && (ctx.state == 'online')) {
if (ctx.state == 'online') {
ctx.ref.$location_at = Date.now();
ctx.ref.$online_for = Date.now();
ctx.ref.$offline_for = '';
}
}
}
};
// ascending