summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-18 21:43:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-18 21:43:37 +0000
commit983f18f8348c96edd3086e750db29778bec8b042 (patch)
tree1f4de85b4fc476ff39eee9f7d9341ae930a3584e /src/users.cpp
parent69f280701b651fcbdc22f68db1714c384b9098f4 (diff)
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.cpp12
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)