diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-15 19:55:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-15 19:55:41 +0000 |
commit | 554ea040741f1341d5b6a1f972e03e6e7afeb848 (patch) | |
tree | 971a9d1cc6c69ab0892b783213aa8adc8f75e3de | |
parent | ba47c49a6c0f0c5c7fc84b6638dc1234e1589c71 (diff) |
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
-rw-r--r-- | src/users.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; |