| 963 | } |
| 964 | |
| 965 | void 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 | |
| 999 | void AdminCache::DumpAdminCache(AdminCachePart part, bool rebuild) |
| 1000 | { |
nothing calls this directly
no test coverage detected