diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-21 19:57:08 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-21 19:57:08 +0000 |
commit | fc05827621fe0c623d2fedf9dcb47c17d57bea16 (patch) | |
tree | 11a6cc4dedd80802520e454f888c0f1e6cbe08aa /src/core/bs_bot.c | |
parent | 04bf65525ab0db8393b89c12c3aeae52b91fe4ac (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/bs_bot.c')
-rw-r--r-- | src/core/bs_bot.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index cfaafac23..9c7ce4854 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -39,15 +39,15 @@ class CommandBSBot : public Command return MOD_CONT; } - if (strlen(user) >= USERMAX) + if (strlen(user) > Config.UserLen) { - notice_lang(Config.s_BotServ, u, BOT_LONG_IDENT, USERMAX - 1); + notice_lang(Config.s_BotServ, u, BOT_LONG_IDENT, Config.UserLen); return MOD_CONT; } - if (strlen(user) > HOSTMAX) + if (strlen(user) > Config.HostLen) { - notice_lang(Config.s_BotServ, u, BOT_LONG_HOST, HOSTMAX); + notice_lang(Config.s_BotServ, u, BOT_LONG_HOST, Config.HostLen); return MOD_CONT; } @@ -81,11 +81,11 @@ class CommandBSBot : public Command return MOD_CONT; } - for (ch = user; *ch && (ch - user) < USERMAX; ch++) + for (ch = user; *ch && (ch - user) < Config.UserLen; ch++) { if (!isalnum(*ch)) { - notice_lang(Config.s_BotServ, u, BOT_BAD_IDENT, USERMAX - 1); + notice_lang(Config.s_BotServ, u, BOT_BAD_IDENT, Config.UserLen); return MOD_CONT; } } @@ -150,15 +150,15 @@ class CommandBSBot : public Command return MOD_CONT; } - if (user && strlen(user) >= USERMAX) + if (user && strlen(user) > Config.UserLen) { - notice_lang(Config.s_BotServ, u, BOT_LONG_IDENT, USERMAX - 1); + notice_lang(Config.s_BotServ, u, BOT_LONG_IDENT, Config.UserLen); return MOD_CONT; } - if (host && strlen(host) > HOSTMAX) + if (host && strlen(host) > Config.HostLen) { - notice_lang(Config.s_BotServ, u, BOT_LONG_HOST, HOSTMAX); + notice_lang(Config.s_BotServ, u, BOT_LONG_HOST, Config.HostLen); return MOD_CONT; } @@ -210,11 +210,11 @@ class CommandBSBot : public Command if (user) { - for (ch = user; *ch && (ch - user) < USERMAX; ch++) + for (ch = user; *ch && (ch - user) < Config.UserLen; ch++) { if (!isalnum(*ch)) { - notice_lang(Config.s_BotServ, u, BOT_BAD_IDENT, USERMAX - 1); + notice_lang(Config.s_BotServ, u, BOT_BAD_IDENT, Config.UserLen); return MOD_CONT; } } |