Commit b8f324de authored by nanahira's avatar nanahira

update hostinfo to latest

parent 3a0eb259
Pipeline #4840 passed with stages
in 76 minutes and 32 seconds
......@@ -9,7 +9,7 @@ room_data = (room)->
title: room.title,
user: {username: room.username}
users: ({username: client.name, position: client.pos} for client in room.players),
options: room.get_old_hostinfo(), # Should be updated when MyCard client updates
options: room.get_roomlist_hostinfo(), # Should be updated when MyCard client updates
arena: settings.modules.arena_mode.enabled && room.arena && settings.modules.arena_mode.mode
init = (http_server, ROOM_all)->
......
......@@ -31,7 +31,7 @@
}
return results;
})(),
options: room.get_old_hostinfo(), // Should be updated when MyCard client updates
options: room.get_roomlist_hostinfo(), // Should be updated when MyCard client updates
arena: settings.modules.arena_mode.enabled && room.arena && settings.modules.arena_mode.mode
};
};
......
......@@ -1583,10 +1583,11 @@ class Room
challonge_duel_log.scoresCsv = "0-0"
return challonge_duel_log
get_old_hostinfo: () -> # Just for supporting websocket roomlist in old MyCard client....
ret = _.clone(@hostinfo)
ret.enable_priority = (@hostinfo.duel_rule != 5)
return ret
get_roomlist_hostinfo: () -> # Just for supporting websocket roomlist in old MyCard client....
#ret = _.clone(@hostinfo)
#ret.enable_priority = (@hostinfo.duel_rule != 5)
#return ret
return @hostinfo
send_replays: () ->
return false unless settings.modules.replay_delay and @replays.length and @hostinfo.mode == 1
......
......@@ -2086,11 +2086,11 @@
return challonge_duel_log;
}
get_old_hostinfo() { // Just for supporting websocket roomlist in old MyCard client....
var ret;
ret = _.clone(this.hostinfo);
ret.enable_priority = this.hostinfo.duel_rule !== 5;
return ret;
get_roomlist_hostinfo() { // Just for supporting websocket roomlist in old MyCard client....
//ret = _.clone(@hostinfo)
//ret.enable_priority = (@hostinfo.duel_rule != 5)
//return ret
return this.hostinfo;
}
send_replays() {
......
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