Commit 37c6359e authored by nanahira's avatar nanahira

no encode before pushing to challonge

parent 9bba5e39
......@@ -938,7 +938,7 @@ class Room
if settings.modules.challonge.enabled and @started and !@kicked
challonge.matches.update({
id: encodeURIComponent(settings.modules.challonge.tournament_id),
id: settings.modules.challonge.tournament_id,
matchId: @challonge_info.id,
match: @challonge_duel_log,
callback: (err, data) ->
......@@ -1624,7 +1624,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
else
ygopro.stoc_send_chat(client, '${loading_user_info}', ygopro.constants.COLORS.BABYBLUE)
challonge.participants.index({
id: encodeURIComponent(settings.modules.challonge.tournament_id),
id: settings.modules.challonge.tournament_id,
callback: (err, data) ->
if err or !data
if err
......@@ -1641,7 +1641,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
return
client.challonge_info = found
challonge.matches.index({
id: encodeURIComponent(settings.modules.challonge.tournament_id),
id: settings.modules.challonge.tournament_id,
callback: (err, data) ->
if client.closed
return
......@@ -2802,7 +2802,7 @@ ygopro.stoc_follow 'CHANGE_SIDE', false, (buffer, info, client, server)->
temp_log = JSON.parse(JSON.stringify(room.challonge_duel_log))
delete temp_log.winnerId
challonge.matches.update({
id: encodeURIComponent(settings.modules.challonge.tournament_id),
id: settings.modules.challonge.tournament_id,
matchId: room.challonge_info.id,
match: temp_log,
callback: (err, data) ->
......
......@@ -1215,7 +1215,7 @@
}
if (settings.modules.challonge.enabled && this.started && !this.kicked) {
challonge.matches.update({
id: encodeURIComponent(settings.modules.challonge.tournament_id),
id: settings.modules.challonge.tournament_id,
matchId: this.challonge_info.id,
match: this.challonge_duel_log,
callback: function(err, data) {
......@@ -2001,7 +2001,7 @@
} else {
ygopro.stoc_send_chat(client, '${loading_user_info}', ygopro.constants.COLORS.BABYBLUE);
challonge.participants.index({
id: encodeURIComponent(settings.modules.challonge.tournament_id),
id: settings.modules.challonge.tournament_id,
callback: function(err, data) {
var found, k, user;
if (err || !data) {
......@@ -2025,7 +2025,7 @@
}
client.challonge_info = found;
challonge.matches.index({
id: encodeURIComponent(settings.modules.challonge.tournament_id),
id: settings.modules.challonge.tournament_id,
callback: function(err, data) {
var len4, len5, match, o, p, player, ref4, ref5;
if (client.closed) {
......@@ -3538,7 +3538,7 @@
temp_log = JSON.parse(JSON.stringify(room.challonge_duel_log));
delete temp_log.winnerId;
challonge.matches.update({
id: encodeURIComponent(settings.modules.challonge.tournament_id),
id: settings.modules.challonge.tournament_id,
matchId: room.challonge_info.id,
match: temp_log,
callback: function(err, data) {
......
......@@ -155,9 +155,9 @@ var UploadToChallonge = function() {
var player_name = player_list[k];
sendResponse("正在上传玩家 "+player_name+" 至Challonge。");
challonge.participants.create({
id: encodeURIComponent(challonge_config.tournament_id),
id: challonge_config.tournament_id,
participant: {
name: encodeURIComponent(player_name)
name: player_name
},
callback: (function(player_name, success_count) {
return function(err, data) {
......
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