Commit e3bf3b1a authored by mercury233's avatar mercury233

fix

parent 8b1f8400
......@@ -327,7 +327,7 @@ class Room
return
return
if @windbot
log.info @windbot
#log.info @windbot
@ai_process = spawn 'mono', ['WindBot.exe'], {
cwd: 'windbot', env: {
YGOPRO_VERSION: settings.version
......@@ -339,7 +339,7 @@ class Room
}
}
@ai_process.stdout.on 'data', (data)=>
log.info "AI stdout: " + data
#log.info "AI stdout: " + data
return
@ai_process.stderr.on 'data', (data)=>
log.info "AI stderr: " + data
......
......@@ -431,7 +431,6 @@
});
});
if (_this.windbot) {
log.info(_this.windbot);
_this.ai_process = spawn('mono', ['WindBot.exe'], {
cwd: 'windbot',
env: {
......@@ -443,9 +442,7 @@
YGOPRO_DIALOG: _this.windbot.dialog
}
});
_this.ai_process.stdout.on('data', function(data) {
log.info("AI stdout: " + data);
});
_this.ai_process.stdout.on('data', function(data) {});
_this.ai_process.stderr.on('data', function(data) {
log.info("AI stderr: " + data);
});
......
......@@ -577,7 +577,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
if client.room.welcome
ygopro.stoc_send_chat client, client.room.welcome, 14
if settings.modules.enable_cloud_replay and !client.room.recorder
if !client.room.recorder
client.room.recorder = recorder = net.connect client.room.port, ->
ygopro.ctos_send recorder, 'PLAYER_INFO', {
name: "Marshtomp"
......@@ -592,7 +592,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
return
recorder.on 'data', (data)->
return unless client.room
return unless client.room and settings.modules.enable_cloud_replay
client.room.recorder_buffers.push data
recorder.on 'error', (error)->
......
......@@ -647,7 +647,7 @@
if (client.room.welcome) {
ygopro.stoc_send_chat(client, client.room.welcome, 14);
}
if (settings.modules.enable_cloud_replay && !client.room.recorder) {
if (!client.room.recorder) {
client.room.recorder = recorder = net.connect(client.room.port, function() {
ygopro.ctos_send(recorder, 'PLAYER_INFO', {
name: "Marshtomp"
......@@ -661,7 +661,7 @@
ygopro.ctos_send(recorder, 'HS_TOOBSERVER');
});
recorder.on('data', function(data) {
if (!client.room) {
if (!(client.room && settings.modules.enable_cloud_replay)) {
return;
}
return client.room.recorder_buffers.push(data);
......
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