summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-25 17:30:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-25 17:30:43 +0000
commit7d7250484c352c13830e63ae41ee8faae40a9bd5 (patch)
tree0fdf4941b4d72469a18eec97506f06f6e94e86e9 /src/users.cpp
parente7b837ec5f120f928a0dc321fa918bdd01ab0c02 (diff)
First phase of conversion to dynamic limits on all the lengths, configured via the <limits> tag
(the tag isnt there yet, these all just run on defaults in the class constructor) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9802 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 4ffdeb678..c892c51f5 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -721,7 +721,7 @@ void User::Oper(const std::string &opertype, const std::string &opername)
this->WriteServ("MODE %s :+o", this->nick.c_str());
FOREACH_MOD(I_OnOper, OnOper(this, opertype));
ServerInstance->Logs->Log("OPER", DEFAULT, "%s!%s@%s opered as type: %s", this->nick.c_str(), this->ident.c_str(), this->host.c_str(), opertype.c_str());
- this->oper.assign(opertype, 0, NICKMAX - 1);
+ this->oper.assign(opertype, 0, ServerInstance->Config->Limits.NickMax);
ServerInstance->Users->all_opers.push_back(this);
opertype_t::iterator iter_opertype = ServerInstance->Config->opertypes.find(this->oper.c_str());
@@ -1521,7 +1521,7 @@ bool User::ChangeName(const char* gecos)
return false;
FOREACH_MOD(I_OnChangeName,OnChangeName(this,gecos));
}
- this->fullname.assign(gecos, 0, MAXGECOS+1);
+ this->fullname.assign(gecos, 0, ServerInstance->Config->Limits.MaxGecos);
return true;
}
@@ -1573,7 +1573,7 @@ bool User::ChangeIdent(const char* newident)
if (this->ServerInstance->Config->CycleHosts)
this->WriteCommonExcept("%s","QUIT :Changing ident");
- this->ident.assign(newident, 0, IDENTMAX + 1);
+ this->ident.assign(newident, 0, ServerInstance->Config->Limits.IdentMax + 1);
this->InvalidateCache();