diff options
| author | 2013-05-17 01:35:04 +0100 | |
|---|---|---|
| committer | 2013-06-06 01:06:47 +0100 | |
| commit | cc79342f50ce345657fca16c90f1d37a9228d8ad (patch) | |
| tree | 0a283f12a2e4eae07e7c0f43a1f254d59cad98e0 /src/users.cpp | |
| parent | Reserve ServerLimits::MaxLine instead of MAXBUF. (diff) | |
| download | inspircd++-cc79342f50ce345657fca16c90f1d37a9228d8ad.tar.gz inspircd++-cc79342f50ce345657fca16c90f1d37a9228d8ad.tar.bz2 inspircd++-cc79342f50ce345657fca16c90f1d37a9228d8ad.zip | |
Compare to ServerLimits::MaxLine instead of MAXBUF.
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |
