From b2c011a23adfb2472f51a4c18bf8f29e6e37bb04 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 12 May 2005 00:36:20 +0000 Subject: Customizable by-byte-size recvq stuff git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1365 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 9d0367a9a..0060b45ee 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -183,6 +183,11 @@ bool userrec::AddBuffer(std::string a) if (recvq[i++] == '\n') break; } + if (recvq.length() > this->recvqmax) + { + this->SetWriteError("RecvQ exceeded"); + WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax); + } // return false if we've had more than 600 characters WITHOUT // a carriage return (this is BAD, drop the socket) return (i < 600); -- cgit v1.2.3