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
f615cdd0
Commit
f615cdd0
authored
Dec 22, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide some logs
parent
b709a506
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
ygopro-server.coffee
ygopro-server.coffee
+3
-3
ygopro-server.js
ygopro-server.js
+1
-3
No files found.
ygopro-server.coffee
View file @
f615cdd0
...
@@ -1096,7 +1096,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -1096,7 +1096,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
welcome
,
ygopro
.
constants
.
COLORS
.
GREEN
)
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
welcome
,
ygopro
.
constants
.
COLORS
.
GREEN
)
if
room
.
welcome
if
room
.
welcome
ygopro
.
stoc_send_chat
(
client
,
room
.
welcome
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
ygopro
.
stoc_send_chat
(
client
,
room
.
welcome
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
if
settings
.
modules
.
arena_mode
.
enabled
#and not client.score_shown
if
settings
.
modules
.
arena_mode
.
enabled
and
client
.
ip
!=
'::ffff:127.0.0.1'
#and not client.score_shown
request
request
url
:
settings
.
modules
.
arena_mode
.
get_score
+
encodeURIComponent
(
client
.
name
),
url
:
settings
.
modules
.
arena_mode
.
get_score
+
encodeURIComponent
(
client
.
name
),
json
:
true
json
:
true
...
@@ -1106,7 +1106,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -1106,7 +1106,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
else
if
!
body
or
_
.
isString
body
else
if
!
body
or
_
.
isString
body
log
.
warn
'LOAD SCORE FAIL'
,
client
.
name
,
response
.
statusCode
,
response
.
statusMessage
,
body
log
.
warn
'LOAD SCORE FAIL'
,
client
.
name
,
response
.
statusCode
,
response
.
statusMessage
,
body
else
else
log
.
info
'LOAD SCORE'
,
client
.
name
,
body
#
log.info 'LOAD SCORE', client.name, body
rank_txt
=
if
body
.
arena_rank
>
0
then
"排名第"
+
body
.
arena_rank
else
"暂无排名"
rank_txt
=
if
body
.
arena_rank
>
0
then
"排名第"
+
body
.
arena_rank
else
"暂无排名"
ygopro
.
stoc_send_chat
(
client
,
"
#{
client
.
name
}
,你有
#{
body
.
exp
}
点经验,你的战斗力是
#{
Math
.
round
(
body
.
pt
)
}
,
#{
rank_txt
}
。正式上线前这些积分可能被重置。"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
ygopro
.
stoc_send_chat
(
client
,
"
#{
client
.
name
}
,你有
#{
body
.
exp
}
点经验,你的战斗力是
#{
Math
.
round
(
body
.
pt
)
}
,
#{
rank_txt
}
。正式上线前这些积分可能被重置。"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
#client.score_shown = true
#client.score_shown = true
...
@@ -1353,7 +1353,7 @@ ygopro.stoc_follow 'DUEL_START', false, (buffer, info, client, server)->
...
@@ -1353,7 +1353,7 @@ ygopro.stoc_follow 'DUEL_START', false, (buffer, info, client, server)->
ygopro
.
stoc_send_random_tip
(
client
)
ygopro
.
stoc_send_random_tip
(
client
)
if
settings
.
modules
.
deck_log
.
enabled
and
client
.
main
and
client
.
main
.
length
and
not
client
.
deck_saved
and
client
.
ip
!=
'::ffff:127.0.0.1'
if
settings
.
modules
.
deck_log
.
enabled
and
client
.
main
and
client
.
main
.
length
and
not
client
.
deck_saved
and
client
.
ip
!=
'::ffff:127.0.0.1'
deck_text
=
'#ygopro-server deck log
\n
#main
\n
'
+
client
.
main
.
join
(
'
\n
'
)
+
'
\n
!side
\n
'
+
client
.
side
.
join
(
'
\n
'
)
+
'
\n
'
deck_text
=
'#ygopro-server deck log
\n
#main
\n
'
+
client
.
main
.
join
(
'
\n
'
)
+
'
\n
!side
\n
'
+
client
.
side
.
join
(
'
\n
'
)
+
'
\n
'
log
.
info
"DECK LOG START"
,
client
.
name
,
room
.
arena
#
log.info "DECK LOG START", client.name, room.arena
if
settings
.
modules
.
deck_log
.
local
if
settings
.
modules
.
deck_log
.
local
deck_name
=
moment
().
format
(
'YYYY-MM-DD HH-mm-ss'
)
+
' '
+
room
.
port
+
' '
+
client
.
pos
+
' '
+
client
.
name
.
replace
(
/\//g
,
'_'
)
deck_name
=
moment
().
format
(
'YYYY-MM-DD HH-mm-ss'
)
+
' '
+
room
.
port
+
' '
+
client
.
pos
+
' '
+
client
.
name
.
replace
(
/\//g
,
'_'
)
fs
.
writeFile
settings
.
modules
.
deck_log
.
local
+
deck_name
+
'.ydk'
,
deck_text
,
'utf-8'
,
(
err
)
->
fs
.
writeFile
settings
.
modules
.
deck_log
.
local
+
deck_name
+
'.ydk'
,
deck_text
,
'utf-8'
,
(
err
)
->
...
...
ygopro-server.js
View file @
f615cdd0
...
@@ -1333,7 +1333,7 @@
...
@@ -1333,7 +1333,7 @@
if
(
room
.
welcome
)
{
if
(
room
.
welcome
)
{
ygopro
.
stoc_send_chat
(
client
,
room
.
welcome
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ygopro
.
stoc_send_chat
(
client
,
room
.
welcome
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
}
}
if
(
settings
.
modules
.
arena_mode
.
enabled
)
{
if
(
settings
.
modules
.
arena_mode
.
enabled
&&
client
.
ip
!==
'
::ffff:127.0.0.1
'
)
{
request
({
request
({
url
:
settings
.
modules
.
arena_mode
.
get_score
+
encodeURIComponent
(
client
.
name
),
url
:
settings
.
modules
.
arena_mode
.
get_score
+
encodeURIComponent
(
client
.
name
),
json
:
true
json
:
true
...
@@ -1344,7 +1344,6 @@
...
@@ -1344,7 +1344,6 @@
}
else
if
(
!
body
||
_
.
isString
(
body
))
{
}
else
if
(
!
body
||
_
.
isString
(
body
))
{
log
.
warn
(
'
LOAD SCORE FAIL
'
,
client
.
name
,
response
.
statusCode
,
response
.
statusMessage
,
body
);
log
.
warn
(
'
LOAD SCORE FAIL
'
,
client
.
name
,
response
.
statusCode
,
response
.
statusMessage
,
body
);
}
else
{
}
else
{
log
.
info
(
'
LOAD SCORE
'
,
client
.
name
,
body
);
rank_txt
=
body
.
arena_rank
>
0
?
"
排名第
"
+
body
.
arena_rank
:
"
暂无排名
"
;
rank_txt
=
body
.
arena_rank
>
0
?
"
排名第
"
+
body
.
arena_rank
:
"
暂无排名
"
;
ygopro
.
stoc_send_chat
(
client
,
client
.
name
+
"
,你有
"
+
body
.
exp
+
"
点经验,你的战斗力是
"
+
(
Math
.
round
(
body
.
pt
))
+
"
,
"
+
rank_txt
+
"
。正式上线前这些积分可能被重置。
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ygopro
.
stoc_send_chat
(
client
,
client
.
name
+
"
,你有
"
+
body
.
exp
+
"
点经验,你的战斗力是
"
+
(
Math
.
round
(
body
.
pt
))
+
"
,
"
+
rank_txt
+
"
。正式上线前这些积分可能被重置。
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
}
}
...
@@ -1663,7 +1662,6 @@
...
@@ -1663,7 +1662,6 @@
}
}
if
(
settings
.
modules
.
deck_log
.
enabled
&&
client
.
main
&&
client
.
main
.
length
&&
!
client
.
deck_saved
&&
client
.
ip
!==
'
::ffff:127.0.0.1
'
)
{
if
(
settings
.
modules
.
deck_log
.
enabled
&&
client
.
main
&&
client
.
main
.
length
&&
!
client
.
deck_saved
&&
client
.
ip
!==
'
::ffff:127.0.0.1
'
)
{
deck_text
=
'
#ygopro-server deck log
\n
#main
\n
'
+
client
.
main
.
join
(
'
\n
'
)
+
'
\n
!side
\n
'
+
client
.
side
.
join
(
'
\n
'
)
+
'
\n
'
;
deck_text
=
'
#ygopro-server deck log
\n
#main
\n
'
+
client
.
main
.
join
(
'
\n
'
)
+
'
\n
!side
\n
'
+
client
.
side
.
join
(
'
\n
'
)
+
'
\n
'
;
log
.
info
(
"
DECK LOG START
"
,
client
.
name
,
room
.
arena
);
if
(
settings
.
modules
.
deck_log
.
local
)
{
if
(
settings
.
modules
.
deck_log
.
local
)
{
deck_name
=
moment
().
format
(
'
YYYY-MM-DD HH-mm-ss
'
)
+
'
'
+
room
.
port
+
'
'
+
client
.
pos
+
'
'
+
client
.
name
.
replace
(
/
\/
/g
,
'
_
'
);
deck_name
=
moment
().
format
(
'
YYYY-MM-DD HH-mm-ss
'
)
+
'
'
+
room
.
port
+
'
'
+
client
.
pos
+
'
'
+
client
.
name
.
replace
(
/
\/
/g
,
'
_
'
);
fs
.
writeFile
(
settings
.
modules
.
deck_log
.
local
+
deck_name
+
'
.ydk
'
,
deck_text
,
'
utf-8
'
,
function
(
err
)
{
fs
.
writeFile
(
settings
.
modules
.
deck_log
.
local
+
deck_name
+
'
.ydk
'
,
deck_text
,
'
utf-8
'
,
function
(
err
)
{
...
...
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