void AdminCache::InvalidateAdminCache(bool unlink_admins) { m_InvalidatingAdmins = true; if (!m_destroying) { int maxClients = playerhelpers->GetMaxClients(); for (int i = 1; i <= maxClients; ++i) { playerhelpers->GetGamePlayer(i)->ClearAdmin(); } } /* Wipe the identity cache first */ List<AuthMethod *>::iterator iter; for (iter=m_AuthMethods.begin(); iter!=m_AuthMethods.end(); iter++) { (*iter)->identities.clear(); } if (unlink_admins) { while (m_FirstUser != INVALID_ADMIN_ID) { InvalidateAdmin(m_FirstUser); } } else { m_FirstUser = -1; m_LastUser = -1; m_FreeUserList = -1; } m_InvalidatingAdmins = false; }
void AdminCache::InvalidateAdminCache(bool unlink_admins) { m_InvalidatingAdmins = true; if (!m_destroying) { g_Players.ClearAllAdmins(); } /* Wipe the identity cache first */ List<AuthMethod>::iterator iter; for (iter=m_AuthMethods.begin(); iter!=m_AuthMethods.end(); iter++) { sm_trie_clear((*iter).table); } if (unlink_admins) { while (m_FirstUser != INVALID_ADMIN_ID) { InvalidateAdmin(m_FirstUser); } } else { m_FirstUser = -1; m_LastUser = -1; m_FreeUserList = -1; } m_InvalidatingAdmins = false; }