Commit 51c82027 authored by nanahira's avatar nanahira

no more connect after closed

parent 4727df69
......@@ -1344,6 +1344,8 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
(checksum & 0xFF) == 0
finish = (buffer)->
if client.closed
return
action = buffer.readUInt8(1) >> 4
if buffer != decrypted_buffer and action in [1, 2, 4]
ygopro.stoc_die(client, '${invalid_password_unauthorized}')
......@@ -1497,6 +1499,8 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
challonge.matches.index({
id: settings.modules.challonge.tournament_id,
callback: (err, data) ->
if client.closed
return
if err or !data
if err
log.warn("Failed loading Challonge match info", err)
......
......@@ -1652,6 +1652,9 @@
};
finish = function(buffer) {
var action, len2, m, name, opt1, opt2, opt3, options, ref2, room, title;
if (client.closed) {
return;
}
action = buffer.readUInt8(1) >> 4;
if (buffer !== decrypted_buffer && (action === 1 || action === 2 || action === 4)) {
ygopro.stoc_die(client, '${invalid_password_unauthorized}');
......@@ -1833,6 +1836,9 @@
id: settings.modules.challonge.tournament_id,
callback: function(err, data) {
var len4, len5, match, o, p, player, ref4, ref5;
if (client.closed) {
return;
}
if (err || !data) {
if (err) {
log.warn("Failed loading Challonge match info", err);
......
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