Skip to content

Commit

Permalink
Strip server name's spaces from beginning and end (multitheftauto#3805)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-A-Rocha authored Oct 25, 2024
1 parent 353b6c6 commit e92702c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Server/mods/deathmatch/logic/CMainConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ", "");
Expand Down

0 comments on commit e92702c

Please sign in to comment.