Commit de13c777 authored by mercury233's avatar mercury233

fix

parent d7f0b0d6
......@@ -264,16 +264,16 @@ class Room
ygopro.stoc_send_chat_to_room this, "#{client.name} #{'退出了观战'}#{if error then ": #{error}" else ''}"
index = _.indexOf(@watchers, client)
@watchers.splice(index, 1) unless index == -1
client.room = null
#client.room = null
else
index = _.indexOf(@players, client)
@players.splice(index, 1) unless index == -1
if @players.length
ygopro.stoc_send_chat_to_room this, "#{client.name} #{'离开了游戏'}#{if error then ": #{error}" else ''}"
client.room = null
#client.room = null
else
@process.kill()
client.room = null
#client.room = null
this.delete()
return
......
......@@ -337,7 +337,6 @@
if (index !== -1) {
this.watchers.splice(index, 1);
}
client.room = null;
} else {
index = _.indexOf(this.players, client);
if (index !== -1) {
......@@ -345,10 +344,8 @@
}
if (this.players.length) {
ygopro.stoc_send_chat_to_room(this, client.name + " " + '离开了游戏' + (error ? ": " + error : ''));
client.room = null;
} else {
this.process.kill();
client.room = null;
this["delete"]();
}
}
......
......@@ -512,7 +512,7 @@ if settings.modules.http
else if u.query.pass == settings.modules.http.password && u.query.welcome
settings.modules.welcome = u.query.welcome
response.writeHead(200)
response.end("welcome " + u.query.stop + " ok")
response.end("welcome " + u.query.welcome + " ok")
else
response.writeHead(404);
......
......@@ -636,7 +636,7 @@
} else if (u.query.pass === settings.modules.http.password && u.query.welcome) {
settings.modules.welcome = u.query.welcome;
response.writeHead(200);
response.end("welcome " + u.query.stop + " ok");
response.end("welcome " + u.query.welcome + " ok");
} else {
response.writeHead(404);
response.end();
......
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