summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 0e676600e..5154b04cb 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -220,6 +220,14 @@ std::string userrec::GetBuffer()
void userrec::AddWriteBuf(std::string data)
{
+ if (this->GetWriteError() != "")
+ return;
+ if (sendq.length() + data.length() > this->sendqmax)
+ {
+ WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),sendq.length());
+ this->SetWriteError("SendQ exceeded");
+ return;
+ }
std::stringstream stream;
stream << sendq << data;
sendq = stream.str();