Commit 60a8ff72 authored by mercury233's avatar mercury233
parents a7f76153 2015f154
...@@ -156,7 +156,7 @@ class Room ...@@ -156,7 +156,7 @@ class Room
Room.all.push this Room.all.push this
@hostinfo ||= @hostinfo ||=
lflist: (list)-> !list.tcg and list.date.isBefore() lflist: _.findIndex settings.lflist, (list)-> !list.tcg and list.date.isBefore()
rule: if settings.modules.enable_TCG_as_default then 2 else 0 rule: if settings.modules.enable_TCG_as_default then 2 else 0
mode: 0 mode: 0
enable_priority: false enable_priority: false
......
...@@ -214,9 +214,9 @@ ...@@ -214,9 +214,9 @@
this.welcome = ''; this.welcome = '';
Room.all.push(this); Room.all.push(this);
this.hostinfo || (this.hostinfo = { this.hostinfo || (this.hostinfo = {
lflist: function(list) { lflist: _.findIndex(settings.lflist, function(list) {
return !list.tcg && list.date.isBefore(); return !list.tcg && list.date.isBefore();
}, }),
rule: settings.modules.enable_TCG_as_default ? 2 : 0, rule: settings.modules.enable_TCG_as_default ? 2 : 0,
mode: 0, mode: 0,
enable_priority: false, enable_priority: false,
......
...@@ -29,7 +29,7 @@ settings.version = parseInt(fs.readFileSync('ygopro/gframe/game.cpp', 'utf8').ma ...@@ -29,7 +29,7 @@ settings.version = parseInt(fs.readFileSync('ygopro/gframe/game.cpp', 'utf8').ma
settings.lflist = (for list in fs.readFileSync('ygopro/lflist.conf', 'utf8').match(/!.*/g) settings.lflist = (for list in fs.readFileSync('ygopro/lflist.conf', 'utf8').match(/!.*/g)
date=list.match(/!([\d\.]+)/) date=list.match(/!([\d\.]+)/)
continue unless date continue unless date
{date: moment(list.match(/!([\d\.]+)/)[1], 'YYYY.MM.DD'), tcg: list.indexOf('TCG') != -1}) {date: moment(list.match(/!([\d\.]+)/)[1], 'YYYY.MM.DD').utcOffset("-08:00"), tcg: list.indexOf('TCG') != -1})
if settings.modules.enable_cloud_replay if settings.modules.enable_cloud_replay
redis = require 'redis' redis = require 'redis'
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
continue; continue;
} }
results.push({ results.push({
date: moment(list.match(/!([\d\.]+)/)[1], 'YYYY.MM.DD'), date: moment(list.match(/!([\d\.]+)/)[1], 'YYYY.MM.DD').utcOffset("-08:00"),
tcg: list.indexOf('TCG') !== -1 tcg: list.indexOf('TCG') !== -1
}); });
} }
......
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