summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-09-11 18:06:27 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-09-11 18:06:27 +0000
commit78030c9c0ab2aa692b7af5aaabf763397914c23c (patch)
treeae5c190be1cf5f8f9fc5f1628364dbc2ffb81f14 /src/config.c
parent46c42cbee471e7fef117881c0b9d62056e8efe67 (diff)
BUILD : 1.7.10 (881) BUGS : NOTES : Added a NickLen directive to make sure bot nicks are not longer than the nets
git-svn-id: svn://svn.anope.org/anope/trunk@881 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@628 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c
index 3abdc46bd..5f956b229 100644
--- a/src/config.c
+++ b/src/config.c
@@ -44,6 +44,7 @@ static char *temp_userhost;
char *HelpChannel;
char *LogChannel;
char *NetworkName;
+int NickLen;
char *s_NickServ;
char *s_ChanServ;
@@ -517,6 +518,7 @@ Directive directives[] = {
{"NetworkName", {{PARAM_STRING, PARAM_RELOAD, &NetworkName}}},
{"NewsCount", {{PARAM_POSINT, PARAM_RELOAD, &NewsCount}}},
{"NewsDB", {{PARAM_STRING, PARAM_RELOAD, &NewsDBName}}},
+ {"NickLen", {{PARAM_POSINT, 0, &NickLen}}},
{"NickservDB", {{PARAM_STRING, PARAM_RELOAD, &NickDBName}}},
{"Numeric", {{PARAM_STRING, PARAM_RELOAD, &Numeric}}},
{"PreNickServDB", {{PARAM_STRING, PARAM_RELOAD, &PreNickDBName}}},
@@ -945,12 +947,11 @@ int read_config(int reload)
CHECK(RemoteServer);
CHECK(ServerName);
CHECK(ServerDesc);
- }
- if (!reload) {
+ CHECK(NickLen);
+
if (RemoteServer3)
CHECK(RemoteServer2);
- }
- if (!reload) {
+
if (LocalHost && RemoteServer) {
if ((!stricmp(LocalHost, RemoteServer))
&& LocalPort == RemotePort) {
@@ -962,6 +963,9 @@ int read_config(int reload)
retval = 0;
}
}
+
+ if (NickLen >= NICKMAX)
+ NickLen = NICKMAX - 1;
}
CHECK(IRCDModule);