Commit 6e57e1f5 authored by mercury233's avatar mercury233

fix

parent 96e2d933
...@@ -199,20 +199,20 @@ ygopro.ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server)-> ...@@ -199,20 +199,20 @@ ygopro.ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server)->
ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
#log.info info #log.info info
if info.version != settings.version if settings.modules.stop
ygopro.stoc_send client, 'ERROR_MSG',{
msg: 4
code: settings.version
}
client.end()
else if settings.modules.stop
ygopro.stoc_send_chat(client,settings.modules.stop) ygopro.stoc_send_chat(client,settings.modules.stop)
ygopro.stoc_send client, 'ERROR_MSG',{ ygopro.stoc_send client, 'ERROR_MSG',{
msg: 1 msg: 1
code: 2 code: 2
} }
client.end() client.end()
else if info.version != settings.version
ygopro.stoc_send client, 'ERROR_MSG',{
msg: 4
code: settings.version
}
client.end()
else if !info.pass.length else if !info.pass.length
ygopro.stoc_send_chat(client,"房间为空,请修改房间名") ygopro.stoc_send_chat(client,"房间为空,请修改房间名")
...@@ -248,6 +248,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -248,6 +248,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
code: 2 code: 2
} }
client.end() client.end()
else else
#log.info 'join_game',info.pass, client.name #log.info 'join_game',info.pass, client.name
client.room = Room.find_or_create_by_name(info.pass) client.room = Room.find_or_create_by_name(info.pass)
......
...@@ -211,19 +211,19 @@ ...@@ -211,19 +211,19 @@
ygopro.ctos_follow('JOIN_GAME', false, function(buffer, info, client, server) { ygopro.ctos_follow('JOIN_GAME', false, function(buffer, info, client, server) {
var j, len, ref; var j, len, ref;
if (info.version !== settings.version) { if (settings.modules.stop) {
ygopro.stoc_send(client, 'ERROR_MSG', {
msg: 4,
code: settings.version
});
client.end();
} else if (settings.modules.stop) {
ygopro.stoc_send_chat(client, settings.modules.stop); ygopro.stoc_send_chat(client, settings.modules.stop);
ygopro.stoc_send(client, 'ERROR_MSG', { ygopro.stoc_send(client, 'ERROR_MSG', {
msg: 1, msg: 1,
code: 2 code: 2
}); });
client.end(); client.end();
} else if (info.version !== settings.version) {
ygopro.stoc_send(client, 'ERROR_MSG', {
msg: 4,
code: settings.version
});
client.end();
} else if (!info.pass.length) { } else if (!info.pass.length) {
ygopro.stoc_send_chat(client, "房间为空,请修改房间名"); ygopro.stoc_send_chat(client, "房间为空,请修改房间名");
ygopro.stoc_send(client, 'ERROR_MSG', { ygopro.stoc_send(client, 'ERROR_MSG', {
......
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