Commit 04f51469 authored by nanahira's avatar nanahira

revert

parent d9770d57
...@@ -87,7 +87,6 @@ ...@@ -87,7 +87,6 @@
"replay_safe": true, "replay_safe": true,
"replay_path": "./replays/", "replay_path": "./replays/",
"replay_archive_tool": "7z", "replay_archive_tool": "7z",
"replay_archive_args": ["a", "-mx0", "-y"],
"show_ip": false, "show_ip": false,
"show_info": true, "show_info": true,
"duel_log": [], "duel_log": [],
......
...@@ -1905,7 +1905,7 @@ if settings.modules.http ...@@ -1905,7 +1905,7 @@ if settings.modules.http
duellog = JSON.stringify settings.modules.tournament_mode.duel_log, null, 2 duellog = JSON.stringify settings.modules.tournament_mode.duel_log, null, 2
response.end(addCallback(u.query.callback, duellog)) response.end(addCallback(u.query.callback, duellog))
else if u.pathname == '/api/archive.zip' and settings.modules.tournament_mode.enabled and settings.modules.tournament_mode.replay_archive_tool else if u.pathname == '/api/archive.zip' and settings.modules.tournament_mode.enabled
if !(u.query.pass == settings.modules.tournament_mode.password) if !(u.query.pass == settings.modules.tournament_mode.password)
response.writeHead(403) response.writeHead(403)
response.end("Invalid password.") response.end("Invalid password.")
...@@ -1916,9 +1916,8 @@ if settings.modules.http ...@@ -1916,9 +1916,8 @@ if settings.modules.http
return return
else else
try try
archive_name = moment().format('YYYY-MM-DD HH:mm:ss') + '.zip' archive_name = moment().format('YYYY-MM-DD HH:mm:ss') + ".zip"
archive_args = settings.modules.tournament_mode.replay_archive_args archive_args = ["a", "-mx0", archive_name]
archive_args.push(archive_name)
for replay in settings.modules.tournament_mode.duel_log for replay in settings.modules.tournament_mode.duel_log
archive_args.push(replay.replay_filename) 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} archive_process = spawn settings.modules.tournament_mode.replay_archive_tool, archive_args, {cwd: settings.modules.tournament_mode.replay_path}
......
...@@ -2408,7 +2408,7 @@ ...@@ -2408,7 +2408,7 @@
duellog = JSON.stringify(settings.modules.tournament_mode.duel_log, null, 2); duellog = JSON.stringify(settings.modules.tournament_mode.duel_log, null, 2);
response.end(addCallback(u.query.callback, duellog)); response.end(addCallback(u.query.callback, duellog));
} }
} else if (u.pathname === '/api/archive.zip' && settings.modules.tournament_mode.enabled && settings.modules.tournament_mode.replay_archive_tool) { } else if (u.pathname === '/api/archive.zip' && settings.modules.tournament_mode.enabled) {
if (!(u.query.pass === settings.modules.tournament_mode.password)) { if (!(u.query.pass === settings.modules.tournament_mode.password)) {
response.writeHead(403); response.writeHead(403);
response.end("Invalid password."); response.end("Invalid password.");
...@@ -2419,9 +2419,8 @@ ...@@ -2419,9 +2419,8 @@
return; return;
} else { } else {
try { try {
archive_name = moment().format('YYYY-MM-DD HH:mm:ss') + '.zip'; archive_name = moment().format('YYYY-MM-DD HH:mm:ss') + ".zip";
archive_args = settings.modules.tournament_mode.replay_archive_args; archive_args = ["a", "-mx0", archive_name];
archive_args.push(archive_name);
ref = settings.modules.tournament_mode.duel_log; ref = settings.modules.tournament_mode.duel_log;
for (j = 0, len = ref.length; j < len; j++) { for (j = 0, len = ref.length; j < len; j++) {
replay = ref[j]; replay = ref[j];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment