Merge pull request #621 from diamante0018/main

maint(auth): only write keys if there is anything to write
This commit is contained in:
Maurice Heumann 2023-04-30 13:18:08 +02:00 committed by GitHub
commit 344128770b

View File

@ -357,10 +357,16 @@ namespace auth
{
game::Info_SetValueForKey(s, key, value);
const auto password_text = (password && password->current.value.string) ? password->current.value.string : "";
game::Info_SetValueForKey(s, "password", password_text);
if (password && *password->current.value.string)
{
game::Info_SetValueForKey(s, "password", password->current.value.string);
}
game::Info_SetValueForKey(s, "clanAbbrev", game::LiveStats_GetClanTagText(0));
const auto* clan_abbrev = game::LiveStats_GetClanTagText(0);
if (*clan_abbrev)
{
game::Info_SetValueForKey(s, "clanAbbrev", clan_abbrev);
}
}
struct component final : generic_component