Commit b8f324de authored by nanahira's avatar nanahira

update hostinfo to latest

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