]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/usermanager.cpp
Update documentation links.
[user/henk/code/inspircd.git] / src / usermanager.cpp
index 1918b5c4c1cc43a985c13fc3880c376297f41045..f62d28faab3d83c8dad12a88454d5e73590ee5c6 100644 (file)
@@ -117,7 +117,11 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
                        ServerInstance->Logs->Log("BANCACHE", DEBUG, std::string("BanCache: Positive hit for ") + New->GetIPString());
                        if (!ServerInstance->Config->MoronBanner.empty())
                                New->WriteServ("NOTICE %s :*** %s", New->nick.c_str(), ServerInstance->Config->MoronBanner.c_str());
-                       this->QuitUser(New, b->Reason);
+
+                       if (ServerInstance->Config->HideBans)
+                               this->QuitUser(New, b->Type + "-Lined", b->Reason.c_str());
+                       else
+                               this->QuitUser(New, b->Reason);
                        return;
                }
                else
@@ -143,6 +147,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 +292,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());