show real connections in players count

This commit is contained in:
ghost 2024-01-13 03:24:33 +02:00
parent 13292efe29
commit becb46d1bc
4 changed files with 20 additions and 6 deletions

View file

@ -175,7 +175,10 @@ class ServerController extends AbstractController
'session' => $session,
'online' => $online,
'players' => $players,
'status' => $status
'status' => $status,
'connections' => is_null($info['Players']) || $info['Players'] < 0 || is_null($info['Bots']) || $info['Bots'] < 0
? 0
: (int) $info['Players'] - (int) $info['Bots']
]
]
);