From cc79342f50ce345657fca16c90f1d37a9228d8ad Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 17 May 2013 01:35:04 +0100 Subject: Compare to ServerLimits::MaxLine instead of MAXBUF. --- src/users.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 656d260e1..cd458f68e 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -443,7 +443,7 @@ void UserIOHandler::OnDataReady() case '\n': goto eol_found; } - if (line.length() < MAXBUF - 2) + if (line.length() < ServerInstance->Config->Limits.MaxLine - 2) line.push_back(c); } // if we got here, the recvq ran out before we found a newline @@ -995,10 +995,10 @@ void LocalUser::Write(const std::string& text) if (!ServerInstance->SE->BoundsCheckFd(&eh)) return; - if (text.length() > MAXBUF - 2) + if (text.length() > ServerInstance->Config->Limits.MaxLine - 2) { // this should happen rarely or never. Crop the string at 512 and try again. - std::string try_again = text.substr(0, MAXBUF - 2); + std::string try_again = text.substr(0, ServerInstance->Config->Limits.MaxLine - 2); Write(try_again); return; } -- cgit v1.3.1-10-gc9f91