From 554ea040741f1341d5b6a1f972e03e6e7afeb848 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Dec 2005 19:55:41 +0000 Subject: [PATCH] Fixed BUG BUG BUG If an opers SendQ exceeded, it would bring down the server! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2490 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/users.cpp b/src/users.cpp index f2a43238a..f5183646c 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -280,8 +280,12 @@ void userrec::AddWriteBuf(std::string data) return; if (sendq.length() + data.length() > (unsigned)this->sendqmax) { - WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax); + /* Fix by brain - Set the error text BEFORE calling writeopers, because + * if we dont it'll recursively call here over and over again trying + * to repeatedly add the text to the sendq! + */ this->SetWriteError("SendQ exceeded"); + WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax); return; } std::stringstream stream; -- 2.39.5