From fa8c9a84181f43ae44b82f9209100d6612290715 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Tue, 17 Mar 2009 12:28:05 +1300 Subject: [PATCH] Clientprefs now loads cookies for clients on late load (bug 3735, r=dvander) --- extensions/clientprefs/extension.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/extensions/clientprefs/extension.cpp b/extensions/clientprefs/extension.cpp index 0aa17c78..126761d0 100644 --- a/extensions/clientprefs/extension.cpp +++ b/extensions/clientprefs/extension.cpp @@ -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; }