From 633e988769491cbf1bcea16bb8e9fe571e86e1c7 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Thu, 1 Nov 2012 21:24:36 -0400 Subject: [PATCH] Add ping to the scoreboard. Ping is being sent now in the POST requests. Show it if it exists in the player_game_stat row. --- xonstat/templates/scoreboard.mako | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xonstat/templates/scoreboard.mako b/xonstat/templates/scoreboard.mako index 288e271..1ce98e8 100644 --- a/xonstat/templates/scoreboard.mako +++ b/xonstat/templates/scoreboard.mako @@ -14,6 +14,11 @@ ${scoreboard_header(game_type_cd, pgstats[0])} ${pgstat.nick_html_colors()|n} % endif + % if pgstat.avg_latency is not None: + + ${int(round(pgstat.avg_latency))} + + % endif ${scoreboard_row(game_type_cd, pgstat)} ${pgstat.score} @@ -28,6 +33,9 @@ ${scoreboard_header(game_type_cd, pgstats[0])} Nick + % if pgstat.avg_latency is not None: + Ping + % endif Kills Deaths Suicides @@ -40,6 +48,9 @@ ${scoreboard_header(game_type_cd, pgstats[0])} Nick + % if pgstat.avg_latency is not None: + Ping + % endif Kills Captures Pickups @@ -54,6 +65,9 @@ ${scoreboard_header(game_type_cd, pgstats[0])} Nick + % if pgstat.avg_latency is not None: + Ping + % endif Kills Score @@ -64,6 +78,9 @@ ${scoreboard_header(game_type_cd, pgstats[0])} Nick + % if pgstat.avg_latency is not None: + Ping + % endif Kills Deaths Suicides -- 2.39.2