From a93860ebd82a96368d9c201b5be28cf08f6ff958 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 20 Oct 2021 22:31:36 -0400 Subject: [PATCH] Fixes bug in player counts --- app/classes/web/panel_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 1a72ac74..5cee62b7 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -142,8 +142,8 @@ class PanelHandler(BaseHandler): data['stats']['waiting_start'] = False total_players = 0 - for server in self.controller.servers.get_all_defined_servers(): - total_players += len(self.controller.stats.get_server_players(server['server_id'])) + for server in page_data['servers']: + total_players += len(self.controller.stats.get_server_players(server['server_data']['server_id'])) page_data['num_players'] = total_players for s in page_data['servers']: