summaryrefslogtreecommitdiff
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r--src/usermanager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 1918b5c4c..76446c5b5 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -287,6 +287,22 @@ void UserManager::RemoveCloneCounts(User *user)
}
}
+void UserManager::RehashCloneCounts()
+{
+ local_clones.clear();
+ global_clones.clear();
+
+ const user_hash& hash = *ServerInstance->Users->clientlist;
+ for (user_hash::const_iterator i = hash.begin(); i != hash.end(); ++i)
+ {
+ User* u = i->second;
+
+ if (IS_LOCAL(u))
+ AddLocalClone(u);
+ AddGlobalClone(u);
+ }
+}
+
unsigned long UserManager::GlobalCloneCount(User *user)
{
clonemap::iterator x = global_clones.find(user->GetCIDRMask());