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
59b909c9
Commit
59b909c9
authored
Feb 12, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow any type of archive tool
parent
12c122c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
config.json
config.json
+2
-0
ygopro-server.coffee
ygopro-server.coffee
+4
-3
ygopro-server.js
ygopro-server.js
+4
-3
No files found.
config.json
View file @
59b909c9
...
...
@@ -87,6 +87,8 @@
"replay_safe"
:
true
,
"replay_path"
:
"./replays/"
,
"replay_archive_tool"
:
"7z"
,
"replay_archive_extension"
:
"zip"
,
"replay_archive_args"
:
[
"a"
,
"-mx0"
,
"-y"
],
"show_ip"
:
false
,
"show_info"
:
true
,
"duel_log"
:
[],
...
...
ygopro-server.coffee
View file @
59b909c9
...
...
@@ -1905,7 +1905,7 @@ if settings.modules.http
duellog
=
JSON
.
stringify
settings
.
modules
.
tournament_mode
.
duel_log
,
null
,
2
response
.
end
(
addCallback
(
u
.
query
.
callback
,
duellog
))
else
if
u
.
pathname
==
'/api/archive.zip'
and
settings
.
modules
.
tournament_mode
.
enabled
else
if
u
.
pathname
==
'/api/archive.zip'
and
settings
.
modules
.
tournament_mode
.
enabled
and
settings
.
modules
.
tournament_mode
.
replay_archive_tool
if
!
(
u
.
query
.
pass
==
settings
.
modules
.
tournament_mode
.
password
)
response
.
writeHead
(
403
)
response
.
end
(
"Invalid password."
)
...
...
@@ -1916,8 +1916,9 @@ if settings.modules.http
return
else
try
archive_name
=
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
+
".zip"
archive_args
=
[
"a"
,
"-mx0"
,
archive_name
]
archive_name
=
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
+
'.'
+
settings
.
modules
.
tournament_mode
.
replay_archive_extension
archive_args
=
settings
.
modules
.
tournament_mode
.
replay_archive_args
archive_args
.
push
(
archive_name
)
for
replay
in
settings
.
modules
.
tournament_mode
.
duel_log
archive_args
.
push
(
replay
.
replay_filename
)
archive_process
=
spawn
settings
.
modules
.
tournament_mode
.
replay_archive_tool
,
archive_args
,
{
cwd
:
settings
.
modules
.
tournament_mode
.
replay_path
}
...
...
ygopro-server.js
View file @
59b909c9
...
...
@@ -2408,7 +2408,7 @@
duellog
=
JSON
.
stringify
(
settings
.
modules
.
tournament_mode
.
duel_log
,
null
,
2
);
response
.
end
(
addCallback
(
u
.
query
.
callback
,
duellog
));
}
}
else
if
(
u
.
pathname
===
'
/api/archive.zip
'
&&
settings
.
modules
.
tournament_mode
.
enabled
)
{
}
else
if
(
u
.
pathname
===
'
/api/archive.zip
'
&&
settings
.
modules
.
tournament_mode
.
enabled
&&
settings
.
modules
.
tournament_mode
.
replay_archive_tool
)
{
if
(
!
(
u
.
query
.
pass
===
settings
.
modules
.
tournament_mode
.
password
))
{
response
.
writeHead
(
403
);
response
.
end
(
"
Invalid password.
"
);
...
...
@@ -2419,8 +2419,9 @@
return
;
}
else
{
try
{
archive_name
=
moment
().
format
(
'
YYYY-MM-DD HH:mm:ss
'
)
+
"
.zip
"
;
archive_args
=
[
"
a
"
,
"
-mx0
"
,
archive_name
];
archive_name
=
moment
().
format
(
'
YYYY-MM-DD HH:mm:ss
'
)
+
'
.
'
+
settings
.
modules
.
tournament_mode
.
replay_archive_extension
;
archive_args
=
settings
.
modules
.
tournament_mode
.
replay_archive_args
;
archive_args
.
push
(
archive_name
);
ref
=
settings
.
modules
.
tournament_mode
.
duel_log
;
for
(
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
j
++
)
{
replay
=
ref
[
j
];
...
...
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