Commit c2539437 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent c16fe70d
...@@ -309,7 +309,7 @@ class Room ...@@ -309,7 +309,7 @@ class Room
@process.stdout.setEncoding('utf8') @process.stdout.setEncoding('utf8')
@process.stdout.once 'data', (data)=> @process.stdout.once 'data', (data)=>
@established = true @established = true
roomlist.create(this) roomlist.create(this) if !@private
@port = parseInt data @port = parseInt data
_.each @players, (player)=> _.each @players, (player)=>
player.server.connect @port, '127.0.0.1',=> player.server.connect @port, '127.0.0.1',=>
......
// Generated by CoffeeScript 1.9.3 // Generated by CoffeeScript 1.10.0
(function() { (function() {
var Room, _, bunyan, get_memory_usage, log, moment, roomlist, settings, spawn, spawnSync, ygopro; var Room, _, bunyan, get_memory_usage, log, moment, roomlist, settings, spawn, spawnSync, ygopro;
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
}; };
function Room(name, hostinfo) { function Room(name, hostinfo) {
var draw_count, lflist, param, rule, start_hand, start_lp, time_limit; var draw_count, error1, lflist, param, rule, start_hand, start_lp, time_limit;
this.hostinfo = hostinfo; this.hostinfo = hostinfo;
this.name = name; this.name = name;
this.alive = true; this.alive = true;
...@@ -394,7 +394,9 @@ ...@@ -394,7 +394,9 @@
this.process.stdout.once('data', (function(_this) { this.process.stdout.once('data', (function(_this) {
return function(data) { return function(data) {
_this.established = true; _this.established = true;
roomlist.create(_this); if (!_this["private"]) {
roomlist.create(_this);
}
_this.port = parseInt(data); _this.port = parseInt(data);
_.each(_this.players, function(player) { _.each(_this.players, function(player) {
player.server.connect(_this.port, '127.0.0.1', function() { player.server.connect(_this.port, '127.0.0.1', function() {
...@@ -410,7 +412,7 @@ ...@@ -410,7 +412,7 @@
}); });
}; };
})(this)); })(this));
} catch (_error) { } catch (error1) {
this.error = "建立房间失败,请重试"; this.error = "建立房间失败,请重试";
} }
} }
......
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