Commit 659bea79 authored by nanahira's avatar nanahira

Merge branch 'mc'

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