summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-22 18:36:33 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-22 18:36:33 +0000
commit03a85ddeaf120bd7234089f9f5333d7895f96deb (patch)
treec79855974065b263d6c3ce6148484735ff28044b /src/modules
parentcb5bcb431dd5ded2bbc749f204878e722e480135 (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/modules')
-rw-r--r--src/modules/extra/m_sqloper.cpp2
-rw-r--r--src/modules/m_spanningtree.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index b4d8520cb..b4b70961b 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -168,7 +168,7 @@ class ModuleSQLOper : public Module
if(HostName != "")
Srv->ChangeHost(user,HostName);
- strlcpy(user->oper,rowresult->GetField("type").c_str(),NICKMAX);
+ strlcpy(user->oper,rowresult->GetField("type").c_str(),NICKMAX-1);
WriteOpers("*** %s (%s@%s) is now an IRC operator of type %s",user->nick,user->ident,user->host,rowresult->GetField("type").c_str());
WriteServ(user->fd,"381 %s :You are now an IRC operator of type %s",user->nick,rowresult->GetField("type").c_str());
if(!strchr(user->modes,'o'))
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index a70cb4976..1577a6a0e 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -896,7 +896,7 @@ class TreeSocket : public InspSocket
{
std::string oldtopic = c->topic;
strlcpy(c->topic,params[3].c_str(),MAXTOPIC);
- strlcpy(c->setby,params[2].c_str(),NICKMAX);
+ strlcpy(c->setby,params[2].c_str(),NICKMAX-1);
c->topicset = ts;
/* if the topic text is the same as the current topic,
* dont bother to send the TOPIC command out, just silently
@@ -1091,7 +1091,7 @@ class TreeSocket : public InspSocket
clientlist[tempnick] = new userrec();
clientlist[tempnick]->fd = FD_MAGIC_NUMBER;
- strlcpy(clientlist[tempnick]->nick, tempnick,NICKMAX);
+ strlcpy(clientlist[tempnick]->nick, tempnick,NICKMAX-1);
strlcpy(clientlist[tempnick]->host, params[2].c_str(),160);
strlcpy(clientlist[tempnick]->dhost, params[3].c_str(),160);
clientlist[tempnick]->server = (char*)FindServerNamePtr(source.c_str());
@@ -1444,7 +1444,7 @@ class TreeSocket : public InspSocket
userrec* u = Srv->FindNick(prefix);
if (u)
{
- strlcpy(u->oper,opertype.c_str(),NICKMAX);
+ strlcpy(u->oper,opertype.c_str(),NICKMAX-1);
if (!strchr(u->modes,'o'))
{
strcat(u->modes,"o");