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
c5bce474
Commit
c5bce474
authored
Oct 24, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
227962ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
ygopro-server.coffee
ygopro-server.coffee
+7
-5
ygopro-server.js
ygopro-server.js
+7
-5
No files found.
ygopro-server.coffee
View file @
c5bce474
...
...
@@ -451,9 +451,9 @@ class Room
arena
:
if
@
hostinfo
.
mode
==
1
then
'athletic'
else
'entertain'
#settings.modules.arena_mode.mode
}},
(
error
,
response
,
body
)
=>
if
error
log
.
warn
'SCORE POST ERROR'
,
error
,
response
.
statusCode
,
response
.
statusMessage
,
body
log
.
warn
'SCORE POST ERROR'
,
error
else
if
response
.
statusCode
!=
204
if
response
.
statusCode
!=
204
or
response
.
statusCode
!=
200
log
.
warn
'SCORE POST FAIL'
,
response
.
statusCode
,
response
.
statusMessage
,
@
name
,
body
else
log
.
info
'SCORE POST OK'
,
response
.
statusCode
,
response
.
statusMessage
,
@
name
,
body
...
...
@@ -1086,8 +1086,10 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
url
:
settings
.
modules
.
arena_mode
.
get_score
+
encodeURIComponent
(
client
.
name
),
json
:
true
,
(
error
,
response
,
body
)
->
if
error
or
!
body
or
_
.
isString
body
log
.
warn
'LOAD SCORE ERROR'
,
client
.
name
,
error
,
response
.
statusCode
,
response
.
statusMessage
,
body
if
error
log
.
warn
'LOAD SCORE ERROR'
,
client
.
name
,
error
else
if
!
body
or
_
.
isString
body
log
.
warn
'LOAD SCORE FAIL'
,
client
.
name
,
response
.
statusCode
,
response
.
statusMessage
,
body
else
log
.
info
'LOAD SCORE'
,
client
.
name
,
body
rank_txt
=
if
body
.
arena_rank
>
0
then
"排名第"
+
body
.
arena_rank
else
"暂无排名"
...
...
@@ -1347,7 +1349,7 @@ ygopro.stoc_follow 'DUEL_START', false, (buffer, info, client, server)->
arena
:
if
room
.
hostinfo
.
mode
==
1
then
'athletic'
else
'entertain'
}},
(
error
,
response
,
body
)
->
if
error
log
.
warn
'DECK POST ERROR'
,
error
,
response
log
.
warn
'DECK POST ERROR'
,
error
else
if
response
.
statusCode
!=
200
log
.
warn
'DECK POST FAIL'
,
response
.
statusCode
,
client
.
name
,
body
...
...
ygopro-server.js
View file @
c5bce474
...
...
@@ -609,9 +609,9 @@
},
(
function
(
_this
)
{
return
function
(
error
,
response
,
body
)
{
if
(
error
)
{
log
.
warn
(
'
SCORE POST ERROR
'
,
error
,
response
.
statusCode
,
response
.
statusMessage
,
body
);
log
.
warn
(
'
SCORE POST ERROR
'
,
error
);
}
else
{
if
(
response
.
statusCode
!==
204
)
{
if
(
response
.
statusCode
!==
204
||
response
.
statusCode
!==
200
)
{
log
.
warn
(
'
SCORE POST FAIL
'
,
response
.
statusCode
,
response
.
statusMessage
,
_this
.
name
,
body
);
}
else
{
log
.
info
(
'
SCORE POST OK
'
,
response
.
statusCode
,
response
.
statusMessage
,
_this
.
name
,
body
);
...
...
@@ -1316,8 +1316,10 @@
json
:
true
},
function
(
error
,
response
,
body
)
{
var
rank_txt
;
if
(
error
||
!
body
||
_
.
isString
(
body
))
{
log
.
warn
(
'
LOAD SCORE ERROR
'
,
client
.
name
,
error
,
response
.
statusCode
,
response
.
statusMessage
,
body
);
if
(
error
)
{
log
.
warn
(
'
LOAD SCORE ERROR
'
,
client
.
name
,
error
);
}
else
if
(
!
body
||
_
.
isString
(
body
))
{
log
.
warn
(
'
LOAD SCORE FAIL
'
,
client
.
name
,
response
.
statusCode
,
response
.
statusMessage
,
body
);
}
else
{
log
.
info
(
'
LOAD SCORE
'
,
client
.
name
,
body
);
rank_txt
=
body
.
arena_rank
>
0
?
"
排名第
"
+
body
.
arena_rank
:
"
暂无排名
"
;
...
...
@@ -1657,7 +1659,7 @@
}
},
function
(
error
,
response
,
body
)
{
if
(
error
)
{
log
.
warn
(
'
DECK POST ERROR
'
,
error
,
response
);
log
.
warn
(
'
DECK POST ERROR
'
,
error
);
}
else
{
if
(
response
.
statusCode
!==
200
)
{
log
.
warn
(
'
DECK POST FAIL
'
,
response
.
statusCode
,
client
.
name
,
body
);
...
...
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