]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/usermanager.cpp
Fix exposing the ban reason when an xline is found in the bancache.
[user/henk/code/inspircd.git] / src / usermanager.cpp
index 76446c5b57fb07371adaa9b6730e6f335d7e0805..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.