mirror of
https://github.com/YGGverse/HLState.git
synced 2026-03-31 09:05:44 +00:00
add server limits config
This commit is contained in:
parent
0dbe79af48
commit
79d70e4a9d
3 changed files with 8 additions and 2 deletions
4
.env
4
.env
|
|
@ -56,6 +56,10 @@ APP_META_KEYWORDS="Half-Life, HLState, YGGverse, Servers, Stats, Online, Analyti
|
|||
# Application template
|
||||
APP_THEME="default"
|
||||
|
||||
# Server info configuration
|
||||
APP_SERVER_ONLINE_LIMIT=10
|
||||
APP_SERVER_PLAYERS_LIMIT=10
|
||||
|
||||
# Masters list, server:port comma separated
|
||||
APP_MASTERS=""
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ parameters:
|
|||
app.meta.title: '%env(APP_META_TITLE)%'
|
||||
app.meta.description: '%env(APP_META_DESCRIPTION)%'
|
||||
app.meta.keywords: '%env(APP_META_KEYWORDS)%'
|
||||
app.server.online.limit: '%env(APP_SERVER_ONLINE_LIMIT)%'
|
||||
app.server.players.limit: '%env(APP_SERVER_PLAYERS_LIMIT)%'
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class ServerController extends AbstractController
|
|||
'crc32server' => $server->getCrc32server()
|
||||
],
|
||||
'online' == $request->get('sort') ? [$field => $order] : ['time' => 'DESC'],
|
||||
10
|
||||
$this->getParameter('app.server.online.limit')
|
||||
);
|
||||
|
||||
// Get players
|
||||
|
|
@ -90,7 +90,7 @@ class ServerController extends AbstractController
|
|||
'crc32server' => $server->getCrc32server()
|
||||
],
|
||||
'players' == $request->get('sort') ? [$field => $order] : ['frags' => 'DESC'],
|
||||
10
|
||||
$this->getParameter('app.server.players.limit')
|
||||
);
|
||||
|
||||
// Format address
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue