]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/usermanager.cpp
Merge pull request #459 from ChrisTX/insp20+fixgeoip
[user/henk/code/inspircd.git] / src / usermanager.cpp
index bef7ccbccbe4158d1eaa428e17b94cb20fc9d28d..0088d1c7f3b8cea1d3e3df7432ef5f8c4be7dd82 100644 (file)
@@ -108,7 +108,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
                if (!b->Type.empty() && !New->exempt)
                {
                        /* user banned */
-                       ServerInstance->Logs->Log("BANCACHE", DEBUG, std::string("BanCache: Positive hit for ") + New->GetIPString());
+                       ServerInstance->Logs->Log("BANCACHE", DEBUG, "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);
@@ -116,7 +116,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
                }
                else
                {
-                       ServerInstance->Logs->Log("BANCACHE", DEBUG, std::string("BanCache: Negative hit for ") + New->GetIPString());
+                       ServerInstance->Logs->Log("BANCACHE", DEBUG, "BanCache: Negative hit for " + New->GetIPString());
                }
        }
        else
@@ -147,6 +147,9 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
                New->WriteServ("NOTICE Auth :*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded.");
 
        FOREACH_MOD(I_OnSetUserIP,OnSetUserIP(New));
+       if (New->quitting)
+               return;
+
        FOREACH_MOD(I_OnUserInit,OnUserInit(New));
 
        if (ServerInstance->Config->NoUserDns)
@@ -217,7 +220,7 @@ void UserManager::QuitUser(User *user, const std::string &quitreason, const char
                        if (!user->quietquit)
                        {
                                ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s (%s) [%s]",
-                                       user->GetFullRealHost().c_str(), user->GetIPString(), oper_reason.c_str());
+                                       user->GetFullRealHost().c_str(), user->GetIPString().c_str(), oper_reason.c_str());
                        }
                }
                else
@@ -225,7 +228,7 @@ void UserManager::QuitUser(User *user, const std::string &quitreason, const char
                        if ((!ServerInstance->SilentULine(user->server)) && (!user->quietquit))
                        {
                                ServerInstance->SNO->WriteToSnoMask('Q',"Client exiting on server %s: %s (%s) [%s]",
-                                       user->server.c_str(), user->GetFullRealHost().c_str(), user->GetIPString(), oper_reason.c_str());
+                                       user->server.c_str(), user->GetFullRealHost().c_str(), user->GetIPString().c_str(), oper_reason.c_str());
                        }
                }
                user->AddToWhoWas();