summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-15 18:12:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-15 18:12:37 +0000
commit827a4bcdb3bdca2e4f6a922f1a2ce943760a871d (patch)
treeba4ec4db77634b67459e860446662b819254b059 /src
parent457362304bba836737f2955f7e871cef431a069e (diff)
Try harder to make sure the ERROR string gets sent when closing a connection
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5994 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp
index d67f96e4f..2a9139643 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -771,7 +771,11 @@ void userrec::QuitUser(InspIRCd* Instance, userrec *user, const std::string &qui
reason.resize(MAXQUIT - 1);
if (IS_LOCAL(user))
+ {
user->Write("ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,reason.c_str());
+ if ((!user->sendq.empty()) && (!(*user->GetWriteError())))
+ user->FlushWriteBuf();
+ }
if (user->registered == REG_ALL)
{