Commit 27c64a4c authored by nanahira's avatar nanahira

fix

parent 7b347026
...@@ -1758,7 +1758,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)-> ...@@ -1758,7 +1758,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)->
checksum += buf.readUInt8(i) checksum += buf.readUInt8(i)
(checksum & 0xFF) == 0 (checksum & 0xFF) == 0
buffer_handle_callback = (buffer, match_permit)-> buffer_handle_callback = (buffer, decrypted_buffer, match_permit)->
if client.closed if client.closed
return return
action = buffer.readUInt8(1) >> 4 action = buffer.readUInt8(1) >> 4
...@@ -1862,7 +1862,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)-> ...@@ -1862,7 +1862,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)->
for i in [0, 2, 4] for i in [0, 2, 4]
decrypted_buffer.writeUInt16LE(buffer.readUInt16LE(i) ^ secret, i) decrypted_buffer.writeUInt16LE(buffer.readUInt16LE(i) ^ secret, i)
if check_buffer_indentity(decrypted_buffer) if check_buffer_indentity(decrypted_buffer)
return buffer_handle_callback(decrypted_buffer, match_permit) return buffer_handle_callback(decrypted_buffer, decrypted_buffer, match_permit)
#TODO: query database directly, like preload. #TODO: query database directly, like preload.
request request
...@@ -1888,7 +1888,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)-> ...@@ -1888,7 +1888,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)->
if !check_buffer_indentity(buffer) if !check_buffer_indentity(buffer)
ygopro.stoc_die(client, '${invalid_password_checksum}') ygopro.stoc_die(client, '${invalid_password_checksum}')
return return
return buffer_handle_callback(buffer, match_permit) return buffer_handle_callback(buffer, decrypted_buffer, match_permit)
return return
if settings.modules.arena_mode.check_permit if settings.modules.arena_mode.check_permit
......
...@@ -2191,7 +2191,7 @@ ...@@ -2191,7 +2191,7 @@
} }
return (checksum & 0xFF) === 0; return (checksum & 0xFF) === 0;
}; };
buffer_handle_callback = function(buffer, match_permit) { buffer_handle_callback = function(buffer, decrypted_buffer, match_permit) {
var action, len2, len3, m, n, name, opt1, opt2, opt3, options, player, ref2, ref3, room, title; var action, len2, len3, m, n, name, opt1, opt2, opt3, options, player, ref2, ref3, room, title;
if (client.closed) { if (client.closed) {
return; return;
...@@ -2319,7 +2319,7 @@ ...@@ -2319,7 +2319,7 @@
decrypted_buffer.writeUInt16LE(buffer.readUInt16LE(i) ^ secret, i); decrypted_buffer.writeUInt16LE(buffer.readUInt16LE(i) ^ secret, i);
} }
if (check_buffer_indentity(decrypted_buffer)) { if (check_buffer_indentity(decrypted_buffer)) {
return buffer_handle_callback(decrypted_buffer, match_permit); return buffer_handle_callback(decrypted_buffer, decrypted_buffer, match_permit);
} }
} }
request({ request({
...@@ -2350,7 +2350,7 @@ ...@@ -2350,7 +2350,7 @@
ygopro.stoc_die(client, '${invalid_password_checksum}'); ygopro.stoc_die(client, '${invalid_password_checksum}');
return; return;
} }
return buffer_handle_callback(buffer, match_permit); return buffer_handle_callback(buffer, decrypted_buffer, match_permit);
}); });
}; };
if (settings.modules.arena_mode.check_permit) { if (settings.modules.arena_mode.check_permit) {
......
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