diff options
| author | 2006-07-18 21:43:37 +0000 | |
|---|---|---|
| committer | 2006-07-18 21:43:37 +0000 | |
| commit | 983f18f8348c96edd3086e750db29778bec8b042 (patch) | |
| tree | 1f4de85b4fc476ff39eee9f7d9341ae930a3584e /src/users.cpp | |
| parent | Tweaks for nonblocking dns (diff) | |
| download | inspircd++-983f18f8348c96edd3086e750db29778bec8b042.tar.gz inspircd++-983f18f8348c96edd3086e750db29778bec8b042.tar.bz2 inspircd++-983f18f8348c96edd3086e750db29778bec8b042.zip | |
Tried to implement sprintf that returns std::string of any size, realized it would scale like unreal scales to ircnet (e.g. it wouldnt!) so took it back out.
Moved chop() functionality into userrec::AddWriteBuf and make it nicer (no strlen)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4433 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp index fbd4820b4..bf99c1fc8 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -472,7 +472,17 @@ void userrec::AddWriteBuf(const std::string &data) return; } - sendq.append(data); + if (data.length() > 512) + { + std::string newdata(data); + newdata.resize(510); + newdata.append("\r\n"); + sendq.append(newdata); + } + else + { + sendq.append(data); + } } // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it) |
