Commit 7ed75163 authored by 神楽坂玲奈's avatar 神楽坂玲奈 Committed by Ma

fix

parent a34331a2
...@@ -322,7 +322,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -322,7 +322,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro.stoc_send_chat(client,'正在读取用户信息...', 11) ygopro.stoc_send_chat(client,'正在读取用户信息...', 11)
request request
baseUrl: settings.modules.mycard_auth, baseUrl: settings.modules.mycard_auth,
url: '/users/' + client.name + '.json' url: '/users/' + encodeURIComponent(client.name) + '.json'
qs: qs:
api_key: '69675c315dfae3d7224688f2c56cf7d3f5016e7cf63f289d945709f11528b02e', api_key: '69675c315dfae3d7224688f2c56cf7d3f5016e7cf63f289d945709f11528b02e',
api_username: client.name, api_username: client.name,
...@@ -408,7 +408,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -408,7 +408,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
draw_count: opt3 & 0xF draw_count: opt3 & 0xF
} }
room = new Room(name, options) room = new Room(name, options)
room.title = info.pass.slice(8) room.title = info.pass.slice(8).replace(String.fromCharCode(0xFEFF), ' ')
room.private = action == 2 room.private = action == 2
when 3 when 3
name = info.pass.slice(8) name = info.pass.slice(8)
...@@ -423,6 +423,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -423,6 +423,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
return return
when 4 when 4
room = Room.find_or_create_by_name('M#' + info.pass.slice(8)) room = Room.find_or_create_by_name('M#' + info.pass.slice(8))
room.private = true
else else
ygopro.stoc_send_chat(client,'主机密码不正确 (Invalid Action)', 11) ygopro.stoc_send_chat(client,'主机密码不正确 (Invalid Action)', 11)
ygopro.stoc_send client, 'ERROR_MSG',{ ygopro.stoc_send client, 'ERROR_MSG',{
......
...@@ -350,7 +350,7 @@ ...@@ -350,7 +350,7 @@
ygopro.stoc_send_chat(client, '正在读取用户信息...', 11); ygopro.stoc_send_chat(client, '正在读取用户信息...', 11);
request({ request({
baseUrl: settings.modules.mycard_auth, baseUrl: settings.modules.mycard_auth,
url: '/users/' + client.name + '.json', url: '/users/' + encodeURIComponent(client.name) + '.json',
qs: { qs: {
api_key: '69675c315dfae3d7224688f2c56cf7d3f5016e7cf63f289d945709f11528b02e', api_key: '69675c315dfae3d7224688f2c56cf7d3f5016e7cf63f289d945709f11528b02e',
api_username: client.name, api_username: client.name,
...@@ -437,7 +437,7 @@ ...@@ -437,7 +437,7 @@
draw_count: opt3 & 0xF draw_count: opt3 & 0xF
}; };
room = new Room(name, options); room = new Room(name, options);
room.title = info.pass.slice(8); room.title = info.pass.slice(8).replace(String.fromCharCode(0xFEFF), ' ');
room["private"] = action === 2; room["private"] = action === 2;
break; break;
case 3: case 3:
...@@ -455,6 +455,7 @@ ...@@ -455,6 +455,7 @@
break; break;
case 4: case 4:
room = Room.find_or_create_by_name('M#' + info.pass.slice(8)); room = Room.find_or_create_by_name('M#' + info.pass.slice(8));
room["private"] = true;
break; break;
default: default:
ygopro.stoc_send_chat(client, '主机密码不正确 (Invalid Action)', 11); ygopro.stoc_send_chat(client, '主机密码不正确 (Invalid Action)', 11);
......
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