commit bbd1fade9c73ab5f68eb16c86f98dd29ad092335 (patch)
parent 6c3ab7681ab11f14a812fe61768558447df4e82d
Author: Alex Karle <alex@karle.co>
Date: Thu, 14 May 2020 23:51:32 -0400
Euchre::Host: Add Players table to /stats
There have been some leaked players recently, so it's helpful to see
both players in the games and players not in games (that may have been
leaked).
In particular, it appears closing a laptop lid doesn't properly close
the websocket... or at least send the "finish" message properly. I'll
have to investigate further.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/Euchre/Host.pm b/lib/Euchre/Host.pm
@@ -208,6 +208,12 @@ sub stats {
}
$msg .= "-----------------------------------------------------------\n";
$msg .= "$num_tables\tTables\n";
+ $msg .= "\n\nPlayers: Start Time\tTable tname\n";
+ $msg .= "===========================================================\n";
+ for my $p (values %PLAYERS) {
+ $msg .= localtime($p->start_time) . "\t" . $p->name . "\n";
+ }
+ $msg .= "-----------------------------------------------------------\n";
$msg .= "$num_players\tPlayers\n";
$msg .= "\n\nServer Stats\n";