From cbb888a47064a8b70254047fd305bea73c2395ad Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 14 May 2007 16:31:49 +0000 Subject: Allow for resizing of MAXBUF above/below 512 via non-interactive configure. (Some crazy mofo on the forums asked for this, good luck its your funeral :p) THIS IS UNSUPPORTED BY US IF YOU CHANGE IT, WE WON'T EVEN TELL YOU HOW :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7022 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index cf3d4aa86..eacbe2779 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -690,8 +690,8 @@ void userrec::AddWriteBuf(const std::string &data) try { - if (data.length() > 512) - sendq.append(data.substr(0,510)).append("\r\n"); + if (data.length() > MAXBUF - 2) /* MAXBUF has a value of 514, to account for line terminators */ + sendq.append(data.substr(0,MAXBUF - 4)).append("\r\n"); /* MAXBUF-4 = 510 */ else sendq.append(data); } -- cgit v1.3.1-10-gc9f91