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
d751d18f
Commit
d751d18f
authored
7 years ago
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save a copy when clearing the log
parent
5608081c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
data/default_config.json
data/default_config.json
+1
-0
ygopro-server.coffee
ygopro-server.coffee
+5
-0
ygopro-server.js
ygopro-server.js
+7
-0
No files found.
data/default_config.json
View file @
d751d18f
...
...
@@ -92,6 +92,7 @@
"replay_archive_tool"
:
"7z"
,
"show_ip"
:
false
,
"show_info"
:
true
,
"log_save_path"
:
"./config/"
,
"password"
:
"123456"
,
"port"
:
7933
},
...
...
This diff is collapsed.
Click to expand it.
ygopro-server.coffee
View file @
d751d18f
...
...
@@ -2070,6 +2070,11 @@ if settings.modules.http
return
else
response
.
writeHead
(
200
)
if
settings
.
modules
.
tournament_mode
.
log_save_path
fs
.
writeFile
(
settings
.
modules
.
tournament_mode
.
log_save_path
+
'duel_log.'
+
moment
().
format
(
'YYYY-MM-DD HH-mm-ss'
)
+
'.json'
,
JSON
.
stringify
(
duel_log
,
null
,
2
),
(
err
)
->
if
err
log
.
warn
'DUEL LOG SAVE ERROR'
,
err
)
duel_log
.
duel_log
=
[]
setting_save
(
duel_log
)
response
.
end
(
addCallback
(
u
.
query
.
callback
,
"[{name:'Success'}]"
))
...
...
This diff is collapsed.
Click to expand it.
ygopro-server.js
View file @
d751d18f
...
...
@@ -2630,6 +2630,13 @@
return
;
}
else
{
response
.
writeHead
(
200
);
if
(
settings
.
modules
.
tournament_mode
.
log_save_path
)
{
fs
.
writeFile
(
settings
.
modules
.
tournament_mode
.
log_save_path
+
'
duel_log.
'
+
moment
().
format
(
'
YYYY-MM-DD HH-mm-ss
'
)
+
'
.json
'
,
JSON
.
stringify
(
duel_log
,
null
,
2
),
function
(
err
)
{
if
(
err
)
{
return
log
.
warn
(
'
DUEL LOG SAVE ERROR
'
,
err
);
}
});
}
duel_log
.
duel_log
=
[];
setting_save
(
duel_log
);
response
.
end
(
addCallback
(
u
.
query
.
callback
,
"
[{name:'Success'}]
"
));
...
...
This diff is collapsed.
Click to expand it.
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