From 827a4bcdb3bdca2e4f6a922f1a2ce943760a871d Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 15 Dec 2006 18:12:37 +0000 Subject: 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 --- src/users.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- cgit v1.2.3