Commit 8fa1a874 authored by nanahira's avatar nanahira

send_chat_to_room append watcher buffer

parent e6e90691
......@@ -1778,14 +1778,14 @@ class Room
return
recordChatMessage: (msg, player) ->
unless settings.modules.cloud_replay.enabled and (@arena or settings.modules.tournament_mode.enabled)
return
for line in ygopro.split_chat_lines(msg, player, settings.modules.i18n.default)
chat_buf = ygopro.helper.prepareMessage("STOC_CHAT", {
player: player
msg: line
})
@addRecorderBuffer(chat_buf)
if settings.modules.cloud_replay.enabled and (@arena or settings.modules.tournament_mode.enabled)
@addRecorderBuffer(chat_buf)
@watcher_buffers.push chat_buf
return
# 网络连接
......
......@@ -2405,9 +2405,6 @@
recordChatMessage(msg, player) {
var chat_buf, j, len, line, ref;
if (!(settings.modules.cloud_replay.enabled && (this.arena || settings.modules.tournament_mode.enabled))) {
return;
}
ref = ygopro.split_chat_lines(msg, player, settings.modules.i18n.default);
for (j = 0, len = ref.length; j < len; j++) {
line = ref[j];
......@@ -2415,7 +2412,10 @@
player: player,
msg: line
});
this.addRecorderBuffer(chat_buf);
if (settings.modules.cloud_replay.enabled && (this.arena || settings.modules.tournament_mode.enabled)) {
this.addRecorderBuffer(chat_buf);
}
this.watcher_buffers.push(chat_buf);
}
}
......
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