bleutyler wrote:src/game/client/components/menus_browser.cpp is where the columns are displayed. I think this is what you are pointing me to.
However, I feel like the point where the game is created is a better point to make this update. When a game is created, do we already go through some checks on the game name? (Length of string comes to mind) so adding a filter of merging any two consecutive spaces into 1 seems like a good spot.
Thoughts? Or am I wrong / missing something due to inexperience with the code base?
That's cool that you're looking for something better - would actually make more sense. Although that was the idea for a start. From then on, you can track where variables were instanced to find the good file/functionyou're looking for.
The way the network part is designed, I don't think there is ever a string length check, but I'll interpret "when a game is created" as "when the info about the game is received by the client".
If you do it server side, it's easy to be bypassed for any modification to remove this filter.
Looking into menus_browser.cpp, I see (line 376), this:
const char *pStr = str_find_nocase(pItem->m_aName, g_Config.m_BrFilterString);
Since pItem comes from (line 232):
const CServerInfo *pItem = ServerBrowser()->SortedGet(m_SelectedIndex);
I go ahead and do this:
And find in serverbrowser.cpp this:
You now need to look where this array
has been set.
I'm going to be late for univ, so I have to leave. If you still do not find anything I'll finish it :)
Good luck!
Not Luck, Just Magic.