diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-22 18:36:33 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-22 18:36:33 +0000 |
commit | 03a85ddeaf120bd7234089f9f5333d7895f96deb (patch) | |
tree | c79855974065b263d6c3ce6148484735ff28044b /src/mode.cpp | |
parent | cb5bcb431dd5ded2bbc749f204878e722e480135 (diff) |
Oh yae, Oh Yae, back in old days of yore, Ye Brain doth set the nick buffer as NICKLEN+1 to ease understanding by newbs who didnt know what thou null terminator was.
And yae, at a date later hence, Ye Brain then setteth ye buffer back to NICKLEN again.
Alas, neither Ye Brain nor Ye trusty followers hath then setteth back the rest of the core to NICKLEN-1, and verily, chaos ensued. :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3286 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 02fdd937d..40ef66f0d 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -453,11 +453,11 @@ char* ModeParser::AddBan(userrec *user,char *dest,chanrec *chan,int status) strlcpy(b.data,dest,MAXBUF); if (*user->nick) { - strlcpy(b.set_by,user->nick,NICKMAX); + strlcpy(b.set_by,user->nick,NICKMAX-1); } else { - strlcpy(b.set_by,Config->ServerName,NICKMAX); + strlcpy(b.set_by,Config->ServerName,NICKMAX-1); } chan->bans.push_back(b); return dest; @@ -1215,7 +1215,7 @@ bool ModeParser::ProcessModuleUmode(char umode, userrec* source, void* dest, boo if (!source) { s2 = new userrec; - strlcpy(s2->nick,Config->ServerName,NICKMAX); + strlcpy(s2->nick,Config->ServerName,NICKMAX-1); strlcpy(s2->modes,"o",52); s2->fd = -1; source = s2; |