]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/usermanager.cpp
Merge pull request #1094 from SISheogorath/insp20+fixed-Override
[user/henk/code/inspircd.git] / src / usermanager.cpp
index 1918b5c4c1cc43a985c13fc3880c376297f41045..2cb7ad51117a4743eb8835f6cd5c79dba9456d6c 100644 (file)
@@ -143,6 +143,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
        {
                ServerInstance->Logs->Log("USERS", DEBUG,"Internal error on new connection");
                this->QuitUser(New, "Internal error handling connection");
+               return;
        }
 
        /* NOTE: even if dns lookups are *off*, we still need to display this.
@@ -287,6 +288,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());