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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
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
nanahira
srvpro
Commits
bba81356
Commit
bba81356
authored
Oct 16, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update post score
parent
b318253a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
config.json
config.json
+6
-1
ygopro-server.coffee
ygopro-server.coffee
+4
-4
ygopro-server.js
ygopro-server.js
+4
-4
No files found.
config.json
View file @
bba81356
...
...
@@ -20,8 +20,13 @@
"post_deck"
:
"http://mycard.moe/ygopro/analytics/deck/text"
,
"hang_timeout"
:
90
,
"arena_mode"
:
{
"mode"
:
"233"
,
"post_score"
:
false
,
"get_score"
:
false
},
"arena_mode_bak"
:
{
"mode"
:
"entertain"
,
"post_score"
:
"https://mycard.moe/ygopro/arena/index.php?c=
trueskill
"
,
"post_score"
:
"https://mycard.moe/ygopro/arena/index.php?c=
update
"
,
"get_score"
:
"https://mycard.moe/ygopro/arena/index.php?c=query&username="
},
"tournament_mode"
:
{
...
...
ygopro-server.coffee
View file @
bba81356
...
...
@@ -425,14 +425,14 @@ class Room
score_array
.
push
{
name
:
name
,
score
:
score
}
log
.
info
@
start_time
,
score_array
request
.
post
{
url
:
settings
.
modules
.
arena_mode
.
post_score
,
form
:
{
accesskey
:
process
.
env
.
MYCARD_
AUTH
_KEY
,
accesskey
:
process
.
env
.
MYCARD_
SCORE
_KEY
,
usernameA
:
score_array
[
0
].
name
,
usernameB
:
score_array
[
1
].
name
,
userscoreA
:
score_array
[
0
].
score
,
userscoreB
:
score_array
[
1
].
score
,
start
:
@
start_time
,
end
:
moment
().
format
(),
arena
:
settings
.
modules
.
arena_mode
.
mode
arena
:
if
room
.
hostinfo
.
mode
==
1
then
'athletic'
else
'entertain'
#
settings.modules.arena_mode.mode
}},
(
error
,
response
,
body
)
=>
if
error
log
.
warn
'SCORE POST ERROR'
,
error
,
response
...
...
@@ -1074,7 +1074,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
log
.
warn
'LOAD SCORE ERROR'
,
client
.
name
,
error
,
response
,
body
else
log
.
info
'LOAD SCORE'
,
client
.
name
,
body
ygopro
.
stoc_send_chat
(
client
,
"
积分系统测试中,您有
#{
body
.
exp
}
点经验,
#{
body
.
pt
}
点战斗力。正式上线前这些数据
可能被重置。"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
ygopro
.
stoc_send_chat
(
client
,
"
您有
#{
body
.
exp
}
点经验,排名第
#{
body
.
exp_rank
}
,
#{
body
.
pt
}
点战斗力,排名第
#{
body
.
arena_rank
}
。正式上线前这些积分
可能被重置。"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
return
if
!
room
.
recorder
...
...
@@ -1336,7 +1336,7 @@ ygopro.stoc_follow 'DUEL_START', false, (buffer, info, client, server)->
log
.
warn
'DECK SAVE ERROR'
,
err
if
settings
.
modules
.
post_deck
request
.
post
{
url
:
settings
.
modules
.
post_deck
,
form
:
{
accesskey
:
process
.
env
.
MYCARD_
AUTH
_KEY
,
accesskey
:
process
.
env
.
MYCARD_
DECK
_KEY
,
deck
:
deck_text
,
playername
:
client
.
name
,
arena
:
if
room
.
hostinfo
.
mode
==
1
then
'athletic'
else
'entertain'
...
...
ygopro-server.js
View file @
bba81356
...
...
@@ -581,14 +581,14 @@
request
.
post
({
url
:
settings
.
modules
.
arena_mode
.
post_score
,
form
:
{
accesskey
:
process
.
env
.
MYCARD_
AUTH
_KEY
,
accesskey
:
process
.
env
.
MYCARD_
SCORE
_KEY
,
usernameA
:
score_array
[
0
].
name
,
usernameB
:
score_array
[
1
].
name
,
userscoreA
:
score_array
[
0
].
score
,
userscoreB
:
score_array
[
1
].
score
,
start
:
this
.
start_time
,
end
:
moment
().
format
(),
arena
:
settings
.
modules
.
arena_mode
.
mode
arena
:
room
.
hostinfo
.
mode
===
1
?
'
athletic
'
:
'
entertain
'
}
},
(
function
(
_this
)
{
return
function
(
error
,
response
,
body
)
{
...
...
@@ -1302,7 +1302,7 @@
log
.
warn
(
'
LOAD SCORE ERROR
'
,
client
.
name
,
error
,
response
,
body
);
}
else
{
log
.
info
(
'
LOAD SCORE
'
,
client
.
name
,
body
);
ygopro
.
stoc_send_chat
(
client
,
"
积分系统测试中,您有
"
+
body
.
exp
+
"
点经验,
"
+
body
.
pt
+
"
点战斗力。正式上线前这些数据
可能被重置。
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ygopro
.
stoc_send_chat
(
client
,
"
您有
"
+
body
.
exp
+
"
点经验,排名第
"
+
body
.
exp_rank
+
"
,
"
+
body
.
pt
+
"
点战斗力,排名第
"
+
body
.
arena_rank
+
"
。正式上线前这些积分
可能被重置。
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
}
});
}
...
...
@@ -1653,7 +1653,7 @@
request
.
post
({
url
:
settings
.
modules
.
post_deck
,
form
:
{
accesskey
:
process
.
env
.
MYCARD_
AUTH
_KEY
,
accesskey
:
process
.
env
.
MYCARD_
DECK
_KEY
,
deck
:
deck_text
,
playername
:
client
.
name
,
arena
:
room
.
hostinfo
.
mode
===
1
?
'
athletic
'
:
'
entertain
'
...
...
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