summaryrefslogtreecommitdiff
path: root/src/core/hs_set.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-03-21 19:57:08 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-03-21 19:57:08 +0000
commitfc05827621fe0c623d2fedf9dcb47c17d57bea16 (patch)
tree11a6cc4dedd80802520e454f888c0f1e6cbe08aa /src/core/hs_set.c
parent04bf65525ab0db8393b89c12c3aeae52b91fe4ac (diff)
Made usermax and hostmax configurable
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2829 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/hs_set.c')
-rw-r--r--src/core/hs_set.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hs_set.c b/src/core/hs_set.c
index e50723d0e..c4b9559e0 100644
--- a/src/core/hs_set.c
+++ b/src/core/hs_set.c
@@ -26,7 +26,7 @@ class CommandHSSet : public Command
{
const char *nick = params[0].c_str();
const char *rawhostmask = params[1].c_str();
- char *hostmask = new char[HOSTMAX];
+ char *hostmask = new char[Config.HostLen];
NickAlias *na;
int32 tmp_time;
@@ -45,9 +45,9 @@ class CommandHSSet : public Command
delete [] hostmask;
return MOD_CONT;
}
- if (strlen(vIdent) > USERMAX - 1)
+ if (strlen(vIdent) > Config.UserLen)
{
- notice_lang(Config.s_HostServ, u, HOST_SET_IDENTTOOLONG, USERMAX);
+ notice_lang(Config.s_HostServ, u, HOST_SET_IDENTTOOLONG, Config.UserLen);
delete [] vIdent;
delete [] rawhostmask;
delete [] hostmask;
@@ -76,11 +76,11 @@ class CommandHSSet : public Command
return MOD_CONT;
}
}
- if (strlen(rawhostmask) < HOSTMAX - 1)
- snprintf(hostmask, HOSTMAX - 1, "%s", rawhostmask);
+ if (strlen(rawhostmask) < Config.HostLen)
+ snprintf(hostmask, Config.HostLen, "%s", rawhostmask);
else
{
- notice_lang(Config.s_HostServ, u, HOST_SET_TOOLONG, HOSTMAX);
+ notice_lang(Config.s_HostServ, u, HOST_SET_TOOLONG, Config.HostLen);
if (vIdent)
{
delete [] vIdent;