From cf0144683dbcb0a62b271ffbeffbee0ba4fbb604 Mon Sep 17 00:00:00 2001 From: Pedro Ivo Hudson Date: Thu, 15 Feb 2024 13:29:31 -0300 Subject: [PATCH] fix: TeamSpeak2 server name (#544) * fix teamspeak2 server name * Update CHANGELOG.md --- CHANGELOG.md | 1 + protocols/teamspeak2.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cb8b8d..846a743 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Farming Simulator 22 (2021) - Added support (By @Vito0912 #531) * Farming Simulator 19 (2018) - Added support (By @Vito0912 #531) * Assetto Corsa - Fixed how `state.numplayers` is set (By @podrivo #538) +* TeamSpeak 2 - Fixed how `state.name` is set (By @podrivo #544) ## 5.0.0-beta.2 * Fixed support for projects using `require`. diff --git a/protocols/teamspeak2.js b/protocols/teamspeak2.js index a2acbde..a5456c1 100644 --- a/protocols/teamspeak2.js +++ b/protocols/teamspeak2.js @@ -18,6 +18,7 @@ export default class teamspeak2 extends Core { const value = equals === -1 ? '' : line.substring(equals + 1) state.raw[key] = value } + if ('server_name' in state.raw) state.name = state.raw.server_name } {