Clientprefs now loads cookies for clients on late load (bug 3735, r=dvander)

This commit is contained in:
Matt Woodrow 2009-03-17 12:28:05 +13:00
parent f6bb6037f3
commit fa8c9a8418

View File

@ -132,6 +132,23 @@ bool ClientPrefs::SDK_OnLoad(char *error, size_t maxlength, bool late)
phrases->AddPhraseFile("clientprefs.phrases");
phrases->AddPhraseFile("common.phrases");
if (late)
{
int maxclients = playerhelpers->GetMaxClients();
for (int i = 1; i <= maxclients; i++)
{
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(i);
if (!pPlayer || !pPlayer->IsAuthorized())
{
continue;
}
g_CookieManager.OnClientAuthorized(i, pPlayer->GetAuthString());
}
}
return true;
}