From 266db8c6a011c335d574998c02f2f1dc75e759ec Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Sun, 3 Dec 2023 03:25:54 +0200 Subject: [PATCH] fix: epic protocol numplayers not being in the raw field (#427) --- CHANGELOG.md | 1 + protocols/epic.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6acaf5b..acdb4ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### 4.3.0 * Fix `Post Scriptum` not being on the valve protocol. +* Fix `Epic` protocol's `numplayers` not being in the `raw` field. ### 4.2.0 * Renamed `Counter Strike: 2D` to `CS2D` in [games.txt](games.txt) (why? see [this](https://cs2d.com/faq.php?show=misc_name#misc_name)). diff --git a/protocols/epic.js b/protocols/epic.js index 8242de2..026ef40 100644 --- a/protocols/epic.js +++ b/protocols/epic.js @@ -76,7 +76,6 @@ class Epic extends Core { state.name = desiredServer.attributes.CUSTOMSERVERNAME_s state.map = desiredServer.attributes.MAPNAME_s state.password = desiredServer.attributes.SERVERPASSWORD_b - state.numplayers = desiredServer.totalPlayers state.maxplayers = desiredServer.settings.maxPublicPlayers for (const player of desiredServer.publicPlayers) { @@ -87,6 +86,7 @@ class Epic extends Core { } state.raw = desiredServer + state.raw.numplayers = desiredServer.totalPlayers } async cleanup (state) {