summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar brain2009-03-18 10:28:10 +0000
committerGravatar brain2009-03-18 10:28:10 +0000
commitfc98fbf44d18ba866102544ca09f1b1c551fdb49 (patch)
tree20bf33870ada4bd9966647bbedd3dadbe22021df /src/users.cpp
parentFix for bug #792 reported by recyclebin, do not attempt to ping local servers... (diff)
Fix for bug #788, set user->quitting before writing error to users socket, and allow appending to sendq for quitting users (just don't check sendq's on quitting users)
This allows the ERROR message to reach the user. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11231 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 6bafe5738..a755c4dd7 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -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