Commit e28b8dc1 authored by nanahira's avatar nanahira

show info

parent ba709cfd
......@@ -263,8 +263,7 @@
"websocket_roomlist": false,
"public_roomlist": false,
"show_ip": false,
"show_info": true,
"quick_death_rule": false,
"quick_death_rule": 0,
"ssl": {
"enabled": false,
"port": 7923,
......
......@@ -159,11 +159,19 @@ imported = false
if settings.modules.http.quick_death_rule == true
settings.modules.http.quick_death_rule = 1
imported = true
#reset http.quick_death_rule from false to 0
if settings.modules.http.quick_death_rule == false
settings.modules.http.quick_death_rule = 0
imported = true
#import the old redis port
if settings.modules.cloud_replay.redis_port
settings.modules.cloud_replay.redis.port = settings.modules.cloud_replay.redis_port
delete settings.modules.cloud_replay.redis_port
imported = true
#delete settings.module.http.show_info
if settings.module.http.show_info
delete settings.module.http.show_info
imported = true
#finish
if imported
setting_save(settings)
......@@ -2931,7 +2939,11 @@ if settings.modules.http
needpass: (room.name.indexOf('$') != -1).toString(),
users: (for player in room.players when player.pos?
id: (-1).toString(),
name: player.name + (if settings.modules.http.show_ip and pass_validated and !player.is_local then (" (IP: " + player.ip.slice(7) + ")") else "") + (if settings.modules.http.show_info and room.started and player.pos != 7 and not (room.hostinfo.mode == 2 and player.pos % 2 > 0) then (" (Score:" + room.scores[player.name] + " LP:" + (if player.lp? then player.lp else room.hostinfo.start_lp) + (if room.hostinfo.mode != 2 then (" Cards:" + (if player.card_count? then player.card_count else room.hostinfo.start_hand)) else "") + ")") else ""),
name: player.name
ip: if settings.modules.http.show_ip and pass_validated and !player.is_local then player.ip.slice(7) else null,
score: if room.started and player.pos != 7 and not (room.hostinfo.mode == 2 and player.pos % 2 > 0) then room.scores[player.name] else "",
lp: if room.started and player.pos != 7 and not (room.hostinfo.mode == 2 and player.pos % 2 > 0) then (if player.lp? then player.lp else room.hostinfo.start_lp) else null,
cards: if room.started and player.pos != 7 and not (room.hostinfo.mode == 2 and player.pos % 2 > 0) then (if player.card_count? then player.card_count else room.hostinfo.start_hand) else null,
pos: player.pos
),
istart: if room.started then (if settings.modules.http.show_info then ("Duel:" + room.duel_count + " " + (if room.changing_side then "Siding" else "Turn:" + (if room.turn? then room.turn else 0) + (if room.death then "/" + (if room.death > 0 then room.death - 1 else "Death") else ""))) else 'start') else 'wait'
......
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