Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
srvpro
Commits
37c6359e
Commit
37c6359e
authored
Sep 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no encode before pushing to challonge
parent
9bba5e39
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
ygopro-server.coffee
ygopro-server.coffee
+4
-4
ygopro-server.js
ygopro-server.js
+4
-4
ygopro-tournament.js
ygopro-tournament.js
+2
-2
No files found.
ygopro-server.coffee
View file @
37c6359e
...
...
@@ -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
)
->
...
...
ygopro-server.js
View file @
37c6359e
...
...
@@ -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
)
{
...
...
ygopro-tournament.js
View file @
37c6359e
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment