Commit 9625f8b3 authored by nanahira's avatar nanahira

Merge branch 'mc'

parents 1f31ed4d 362f3924
...@@ -4094,8 +4094,9 @@ if settings.modules.http ...@@ -4094,8 +4094,9 @@ if settings.modules.http
response.writeHead(200) response.writeHead(200)
response.end(addCallback(u.query.callback, "['密码错误', 0]")) response.end(addCallback(u.query.callback, "['密码错误', 0]"))
return return
for room in ROOM_all when room and room.established _async.each ROOM_all, (room)->
ygopro.stoc_send_chat_to_room(room, u.query.shout, ygopro.constants.COLORS.YELLOW) if room and room.established
ygopro.stoc_send_chat_to_room(room, u.query.shout, ygopro.constants.COLORS.YELLOW)
response.writeHead(200) response.writeHead(200)
response.end(addCallback(u.query.callback, "['shout ok', '" + u.query.shout + "']")) response.end(addCallback(u.query.callback, "['shout ok', '" + u.query.shout + "']"))
......
...@@ -5263,7 +5263,7 @@ ...@@ -5263,7 +5263,7 @@
return callback + "( " + text + " );"; return callback + "( " + text + " );";
}; };
requestListener = async function(request, response) { requestListener = async function(request, response) {
var archive_args, archive_name, archive_process, check, death_room_found, duellog, err, error, filename, getpath, key, len2, len3, len4, m, n, o, parseQueryString, pass_validated, ref3, ref4, replay, ret_keys, room, roomsjson, tasks, u; var archive_args, archive_name, archive_process, check, death_room_found, duellog, err, error, filename, getpath, key, len2, len3, m, n, parseQueryString, pass_validated, ref3, ref4, replay, ret_keys, roomsjson, tasks, u;
parseQueryString = true; parseQueryString = true;
u = url.parse(request.url, parseQueryString); u = url.parse(request.url, parseQueryString);
//pass_validated = u.query.pass == settings.modules.http.password //pass_validated = u.query.pass == settings.modules.http.password
...@@ -5462,12 +5462,11 @@ ...@@ -5462,12 +5462,11 @@
response.end(addCallback(u.query.callback, "['密码错误', 0]")); response.end(addCallback(u.query.callback, "['密码错误', 0]"));
return; return;
} }
for (o = 0, len4 = ROOM_all.length; o < len4; o++) { _async.each(ROOM_all, function(room) {
room = ROOM_all[o];
if (room && room.established) { if (room && room.established) {
ygopro.stoc_send_chat_to_room(room, u.query.shout, ygopro.constants.COLORS.YELLOW); return ygopro.stoc_send_chat_to_room(room, u.query.shout, ygopro.constants.COLORS.YELLOW);
} }
} });
response.writeHead(200); response.writeHead(200);
response.end(addCallback(u.query.callback, "['shout ok', '" + u.query.shout + "']")); response.end(addCallback(u.query.callback, "['shout ok', '" + u.query.shout + "']"));
} else if (u.query.stop) { } else if (u.query.stop) {
......
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