Commit f0e647fe authored by mercury233's avatar mercury233

fix var name

parent 39af0bcd
......@@ -1532,7 +1532,7 @@ ygopro.stoc_follow 'REPLAY', true, (buffer, info, client, server)->
Cloud_replay_ids.push room.cloud_replay_id
if settings.modules.tournament_mode.enabled
if client.is_host
log = {
duellog = {
time: moment().format('YYYY-MM-DD HH:mm:ss'),
name: room.name,
roomid: room.port.toString(),
......@@ -1542,7 +1542,7 @@ ygopro.stoc_follow 'REPLAY', true, (buffer, info, client, server)->
winner: player.pos == room.winner
)
}
settings.modules.tournament_mode.duel_log.push log
settings.modules.tournament_mode.duel_log.push duellog
nconf.myset(settings, "modules:tournament_mode:duel_log", settings.modules.tournament_mode.duel_log)
if settings.modules.enable_cloud_replay
ygopro.stoc_send_chat(client, "本场比赛云录像:R##{room.cloud_replay_id}。将于本局结束后可播放。", ygopro.constants.COLORS.BABYBLUE)
......
......@@ -1905,7 +1905,7 @@
});
ygopro.stoc_follow('REPLAY', true, function(buffer, info, client, server) {
var player, room;
var duellog, player, room;
room = ROOM_all[client.rid];
if (!room) {
return settings.modules.tournament_mode.enabled;
......@@ -1915,7 +1915,7 @@
}
if (settings.modules.tournament_mode.enabled) {
if (client.is_host) {
log = {
duellog = {
time: moment().format('YYYY-MM-DD HH:mm:ss'),
name: room.name,
roomid: room.port.toString(),
......@@ -1934,7 +1934,7 @@
return results;
})()
};
settings.modules.tournament_mode.duel_log.push(log);
settings.modules.tournament_mode.duel_log.push(duellog);
nconf.myset(settings, "modules:tournament_mode:duel_log", settings.modules.tournament_mode.duel_log);
}
if (settings.modules.enable_cloud_replay) {
......
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