aboutsummaryrefslogtreecommitdiffstats
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-10-10 14:47:24 +0100
committerGravatar Sadie Powell2024-10-10 14:47:24 +0100
commit5eb21f239bf89b0615612cb7b7b8fa5f1e13fb73 (patch)
tree5dade66280f265c263245ef44ca979aeb48698a3 /src/usermanager.cpp
parentRevert "Tell people to use the main ChatSpike domain not our alias". (diff)
downloadinspircd++-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.cpp13
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());