Commit e1e57055 authored by mercury233's avatar mercury233

update hang check in mycard

parent e9063687
...@@ -1715,7 +1715,7 @@ if settings.modules.random_duel.enabled ...@@ -1715,7 +1715,7 @@ if settings.modules.random_duel.enabled
if settings.modules.mycard.enabled if settings.modules.mycard.enabled
setInterval ()-> setInterval ()->
for room in ROOM_all when room and room.started and room.arena and room.changing_side and room.last_active_time and room.waiting_for_player for room in ROOM_all when room and room.started and room.arena and room.last_active_time and room.waiting_for_player
time_passed = Math.floor((moment() - room.last_active_time) / 1000) time_passed = Math.floor((moment() - room.last_active_time) / 1000)
#log.info time_passed #log.info time_passed
if time_passed >= settings.modules.random_duel.hang_timeout if time_passed >= settings.modules.random_duel.hang_timeout
......
...@@ -2163,7 +2163,7 @@ ...@@ -2163,7 +2163,7 @@
var j, len, room, time_passed; var j, len, room, time_passed;
for (j = 0, len = ROOM_all.length; j < len; j++) { for (j = 0, len = ROOM_all.length; j < len; j++) {
room = ROOM_all[j]; room = ROOM_all[j];
if (!(room && room.started && room.arena && room.changing_side && room.last_active_time && room.waiting_for_player)) { if (!(room && room.started && room.arena && room.last_active_time && room.waiting_for_player)) {
continue; continue;
} }
time_passed = Math.floor((moment() - room.last_active_time) / 1000); time_passed = Math.floor((moment() - room.last_active_time) / 1000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment