diff options
| author | 2007-05-14 16:31:49 +0000 | |
|---|---|---|
| committer | 2007-05-14 16:31:49 +0000 | |
| commit | cbb888a47064a8b70254047fd305bea73c2395ad (patch) | |
| tree | 5e4e9eec35b169166e2a6589faa4ceeaaa0db45c /src/users.cpp | |
| parent | Now really add +f to <options:chanopsexempt>. Previous add was m_chanfilter (... (diff) | |
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
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |
