]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
The issue from stable does not exist here, because we initialize userrec::quietquit...
[user/henk/code/inspircd.git] / src / users.cpp
index 19e4925b60f5209f90f41e414d57a50a5e28b467..f6ef92af336e40fcca24c991fecd0dfb40119275 100644 (file)
@@ -181,7 +181,7 @@ User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance
        Penalty = 0;
        lines_in = lastping = signon = idle_lastmsg = nping = registered = 0;
        ChannelCount = timeout = bytes_in = bytes_out = cmds_in = cmds_out = 0;
-       OverPenalty = ExemptFromPenalty = quitting = exempt = haspassed = dns_done = false;
+       quietquit = OverPenalty = ExemptFromPenalty = quitting = exempt = haspassed = dns_done = false;
        fd = -1;
        recvq.clear();
        sendq.clear();
@@ -721,7 +721,12 @@ void User::QuitUser(InspIRCd* Instance, User *user, const std::string &quitreaso
        user->Write("ERROR :Closing link (%s@%s) [%s]", user->ident, user->host, *operreason ? operreason : quitreason.c_str());
        user->quietquit = false;
        user->quitmsg = quitreason;
-       user->operquitmsg = operreason;
+
+       if (!*operreason)
+               user->operquitmsg = quitreason;
+       else
+               user->operquitmsg = operreason;
+
        Instance->GlobalCulls.AddItem(user);
 }
 
@@ -1060,7 +1065,7 @@ void User::Write(std::string text)
 
        try
        {
-               ServerInstance->Logs->Log("USERIO", DEBUG,"C[%d] O %s", this->GetFd(), text.c_str());
+               ServerInstance->Logs->Log("USEROUTPUT", DEBUG,"C[%d] O %s", this->GetFd(), text.c_str());
                text.append("\r\n");
        }
        catch (...)
@@ -1445,7 +1450,7 @@ bool User::ChangeIdent(const char* newident)
        return true;
 }
 
-void User::SendAll(const char* command, char* text, ...)
+void User::SendAll(const char* command, const char* text, ...)
 {
        char textbuffer[MAXBUF];
        char formatbuffer[MAXBUF];