Commit 68cb8638 authored by nanahira's avatar nanahira

Merge branch 'mc'

parents d27f713f 43c23664
......@@ -1355,6 +1355,9 @@ class Room
score_array[1] = { name: null, score: -5, deck: null }
score_array[0].score = -5
score_array[1].score = -5
formatted_replays = []
for repbuf in @replays when repbuf
formatted_replays.push(repbuf.toString("base64"))
request.post { url : settings.modules.arena_mode.post_score , form : {
accesskey: settings.modules.arena_mode.accesskey,
usernameA: score_array[0].name,
......@@ -1363,7 +1366,7 @@ class Room
userscoreB: score_array[1].score,
userdeckA: score_array[0].deck,
userdeckB: score_array[1].deck,
replays: @replays,
replays: formatted_replays,
start: @start_time,
end: end_time,
arena: @arena
......
......@@ -1701,7 +1701,7 @@
}
Room.prototype["delete"] = function() {
var end_time, index, log_rep_id, name, player_ips, player_names, recorder_buffer, ref3, replay_id, room_name, score, score_array, score_form;
var end_time, formatted_replays, index, len3, log_rep_id, m, name, player_ips, player_names, recorder_buffer, ref3, ref4, repbuf, replay_id, room_name, score, score_array, score_form;
if (this.deleted) {
return;
}
......@@ -1760,6 +1760,14 @@
score_array[0].score = -5;
score_array[1].score = -5;
}
formatted_replays = [];
ref4 = this.replays;
for (m = 0, len3 = ref4.length; m < len3; m++) {
repbuf = ref4[m];
if (repbuf) {
formatted_replays.push(repbuf.toString("base64"));
}
}
request.post({
url: settings.modules.arena_mode.post_score,
form: {
......@@ -1770,7 +1778,7 @@
userscoreB: score_array[1].score,
userdeckA: score_array[0].deck,
userdeckB: score_array[1].deck,
replays: this.replays,
replays: formatted_replays,
start: this.start_time,
end: end_time,
arena: this.arena
......
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