From e92702ca56a30b0c434cc29402b2d378ba4d7da4 Mon Sep 17 00:00:00 2001 From: Fernando Rocha <34967844+Fernando-A-Rocha@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:27:10 +0100 Subject: [PATCH] Strip server name's spaces from beginning and end (#3805) --- Server/mods/deathmatch/logic/CMainConfig.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Server/mods/deathmatch/logic/CMainConfig.cpp b/Server/mods/deathmatch/logic/CMainConfig.cpp index a535aa0ab6..d47950e73e 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.cpp +++ b/Server/mods/deathmatch/logic/CMainConfig.cpp @@ -133,6 +133,9 @@ bool CMainConfig::Load() return false; } + // Strip spaces from beginning and end of server name + m_strServerName = SString(m_strServerName).TrimStart(" ").TrimEnd(" "); + // Grab the forced server ip(s) GetString(m_pRootNode, "serverip", m_strServerIP); m_strServerIP = SString(m_strServerIP).Replace(" ", "");