diff options
| author | 2024-10-10 14:47:24 +0100 | |
|---|---|---|
| committer | 2024-10-10 14:47:24 +0100 | |
| commit | 5eb21f239bf89b0615612cb7b7b8fa5f1e13fb73 (patch) | |
| tree | 5dade66280f265c263245ef44ca979aeb48698a3 /src/usermanager.cpp | |
| parent | Revert "Tell people to use the main ChatSpike domain not our alias". (diff) | |
| download | inspircd++-5eb21f239bf89b0615612cb7b7b8fa5f1e13fb73.tar.gz inspircd++-5eb21f239bf89b0615612cb7b7b8fa5f1e13fb73.tar.bz2 inspircd++-5eb21f239bf89b0615612cb7b7b8fa5f1e13fb73.zip | |
When a server stops being ulined remove its users from the uline list.
Diffstat (limited to 'src/usermanager.cpp')
| -rw-r--r-- | src/usermanager.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index d410131f4..c20609a2c 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -353,6 +353,19 @@ void UserManager::RehashCloneCounts() } } +void UserManager::RehashULines() +{ + UserManager::ULineList newulines; + const user_hash& users = ServerInstance->Users.GetUsers(); + for (user_hash::const_iterator i = users.begin(); i != users.end(); ++i) + { + User* user = i->second; + if (user->server->IsULine()) + newulines.push_back(user); + } + std::swap(ServerInstance->Users.all_ulines, newulines); +} + const UserManager::CloneCounts& UserManager::GetCloneCounts(User* user) const { CloneMap::const_iterator it = clonemap.find(user->GetCIDRMask()); |
