]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Use 'c' snomask instead of 'A' snomask for ldap auth failures, reported by drich.
[user/henk/code/inspircd.git] / src / users.cpp
index 6bafe5738543c0a1df1fcad47a72763bbfa2fcdd..a755c4dd7348573b8b425b7a6cc1e5387a9f87ec 100644 (file)
@@ -671,10 +671,7 @@ std::string User::GetBuffer()
 
 void User::AddWriteBuf(const std::string &data)
 {
-       if (this->quitting)
-               return;
-
-       if (this->MyClass && !this->HasPrivPermission("users/flood/increased-buffers") && sendq.length() + data.length() > this->MyClass->GetSendqMax())
+       if (!this->quitting && this->MyClass && !this->HasPrivPermission("users/flood/increased-buffers") && sendq.length() + data.length() > this->MyClass->GetSendqMax())
        {
                /*
                 * Fix by brain - Set the error text BEFORE calling, because
@@ -686,6 +683,9 @@ void User::AddWriteBuf(const std::string &data)
                return;
        }
 
+       // We still want to append data to the sendq of a quitting user,
+       // e.g. their ERROR message that says 'closing link'
+
        if (data.length() > MAXBUF - 2) /* MAXBUF has a value of 514, to account for line terminators */
                sendq.append(data.substr(0,MAXBUF - 4)).append("\r\n"); /* MAXBUF-4 = 510 */
        else