maint: update number of max servers per game

This commit is contained in:
Diavolo 2023-12-03 18:53:02 +01:00
parent 42b5e31bbc
commit fa24128787
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5
2 changed files with 12 additions and 7 deletions

View File

@ -21,6 +21,7 @@ jobs:
fail-fast: false
matrix:
configuration:
- Debug
- Release
arch:
- x64
@ -68,10 +69,13 @@ jobs:
fail-fast: false
matrix:
configuration:
- Debug
- Release
arch:
- x64
include:
- configuration: Debug
config: debug
- configuration: Release
config: release
steps:
@ -122,11 +126,14 @@ jobs:
fail-fast: false
matrix:
configuration:
- Debug
- Release
arch:
- x64
- arm64
include:
- configuration: Debug
config: debug
- configuration: Release
config: release
- arch: x64

View File

@ -3,7 +3,7 @@
constexpr auto T7_PROTOCOL = 7;
constexpr size_t MAX_SERVERS_PER_GAME = 15;
constexpr size_t MAX_SERVERS_PER_GAME = 10;
void elimination_handler::run_frame()
{
@ -29,8 +29,8 @@ void elimination_handler::run_frame()
if (server.game == game_type::t7 && server.protocol < T7_PROTOCOL)
{
#ifdef _DEBUG
console::info("Removing T7 server '%s' because protocol %i is less than %i\n",
context.get_address().to_string().data(), server.protocol, T7_PROTOCOL);
console::log("Removing T7 server '%s' because they are using an outdated protocol (%i)\n",
context.get_address().to_string().data(), server.protocol);
#endif
context.remove();
}
@ -38,10 +38,8 @@ void elimination_handler::run_frame()
++server_count[server.game][context.get_address()];
if (server_count[server.game][context.get_address()] >= MAX_SERVERS_PER_GAME)
{
#ifdef _DEBUG
console::info("Removing server '%s' because it exceeds MAX_SERVERS_PER_GAME\n",
context.get_address().to_string().data());
#endif
console::log("Removing server '%s' because it exceeds MAX_SERVERS_PER_GAME\n",
context.get_address().to_string().data());
context.remove();
}
});