From bbd1fade9c73ab5f68eb16c86f98dd29ad092335 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Thu, 14 May 2020 23:51:32 -0400 Subject: [PATCH] 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. --- lib/Euchre/Host.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Euchre/Host.pm b/lib/Euchre/Host.pm index 6e8d35b..27e7265 100644 --- 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"; -- libgit2 1.1.1