From 983f18f8348c96edd3086e750db29778bec8b042 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 18 Jul 2006 21:43:37 +0000 Subject: 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 --- src/users.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/users.cpp') 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) -- cgit v1.2.3