MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / InvalidateAdminCache

Method InvalidateAdminCache

core/logic/AdminCache.cpp:965–997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963}
964
965void AdminCache::InvalidateAdminCache(bool unlink_admins)
966{
967 m_InvalidatingAdmins = true;
968 if (!m_destroying)
969 {
970 int maxClients = playerhelpers->GetMaxClients();
971 for (int i = 1; i <= maxClients; ++i)
972 {
973 playerhelpers->GetGamePlayer(i)->ClearAdmin();
974 }
975 }
976 /* Wipe the identity cache first */
977 List<AuthMethod *>::iterator iter;
978 for (iter=m_AuthMethods.begin();
979 iter!=m_AuthMethods.end();
980 iter++)
981 {
982 (*iter)->identities.clear();
983 }
984
985 if (unlink_admins)
986 {
987 while (m_FirstUser != INVALID_ADMIN_ID)
988 {
989 InvalidateAdmin(m_FirstUser);
990 }
991 } else {
992 m_FirstUser = -1;
993 m_LastUser = -1;
994 m_FreeUserList = -1;
995 }
996 m_InvalidatingAdmins = false;
997}
998
999void AdminCache::DumpAdminCache(AdminCachePart part, bool rebuild)
1000{

Callers

nothing calls this directly

Calls 6

GetMaxClientsMethod · 0.80
ClearAdminMethod · 0.80
GetGamePlayerMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected