diff options
-rw-r--r-- | data/example_new.conf | 20 | ||||
-rw-r--r-- | src/config.c | 9 |
2 files changed, 24 insertions, 5 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index bca494c00..f339f88fd 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -312,3 +312,23 @@ nickserv */ addaccessonreg = yes } + +/* + * [REQUIRED] ChanServ Config + * + * This section is used to set up the Channel Registration Service pseudo-client. + * Unless specified otherwise, all directives are required. + */ +chanserv +{ + /* + * The nickname of the ChanServ client. + */ + nick = "ChanServ" + + /* + * The description of the ChanServ client, which will be used as the GECOS (real + * name) of the client. + */ + description = "Channel Registration Service" +} diff --git a/src/config.c b/src/config.c index 41f5cedd7..b6e8c6d96 100644 --- a/src/config.c +++ b/src/config.c @@ -501,7 +501,7 @@ int ServerConfig::Read(bool bail) { errstr.clear(); // These tags MUST occur and must ONLY occur once in the config file - static const char *Once[] = {"nickserv", NULL}; + static const char *Once[] = {"nickserv", "chanserv", NULL}; // These tags can occur ONCE or not at all InitialConfig Values[] = { /* The following comments are from CyberBotX to w00t as examples to use: @@ -558,7 +558,7 @@ int ServerConfig::Read(bool bail) {"uplink", "port", "0", new ValueContainerInt(&RemotePort), DT_INTEGER | DT_NORELOAD, ValidatePort}, {"uplink", "password", "", new ValueContainerChar(&RemotePassword), DT_NOSPACES | DT_NORELOAD, ValidateNotEmpty}, {"nickserv", "nick", "NickServ", new ValueContainerChar(&s_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, - {"nickserv", "descrption", "Nickname Registration Service", new ValueContainerChar(&desc_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, + {"nickserv", "description", "Nickname Registration Service", new ValueContainerChar(&desc_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, {"nickserv", "database", "nick.db", new ValueContainerChar(&NickDBName), DT_CHARPTR, ValidateNotEmpty}, {"nickserv", "emailregistration", "no", new ValueContainerBool(&NSEmailReg), DT_BOOLEAN, NoValidation}, {"nickserv", "prenickdatabase", "", new ValueContainerChar(&PreNickDBName), DT_CHARPTR, ValidateEmailReg}, @@ -584,6 +584,8 @@ int ServerConfig::Read(bool bail) {"nickserv", "restrictgetpass", "no", new ValueContainerBool(&NSRestrictGetPass), DT_BOOLEAN, NoValidation}, {"nickserv", "nicktracking", "no", new ValueContainerBool(&NSNickTracking), DT_BOOLEAN, NoValidation}, {"nickserv", "addaccessonreg", "no", new ValueContainerBool(&NSAddAccessOnReg), DT_BOOLEAN, NoValidation}, + {"chanserv", "nick", "ChanServ", new ValueContainerChar(&s_ChanServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, + {"chanserv", "description", "Channel Registration Service", new ValueContainerChar(&desc_ChanServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, {NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation} }; /* These tags can occur multiple times, and therefore they have special code to read them @@ -1186,8 +1188,6 @@ Directive directives[] = { {PARAM_STRING, 0, &desc_HostServ}}}, {"ChanCoreModules", {{PARAM_STRING, PARAM_RELOAD, &ChanCoreModules}}}, {"ChanServDB", {{PARAM_STRING, PARAM_RELOAD, &ChanDBName}}}, - {"ChanServName", {{PARAM_STRING, 0, &s_ChanServ}, - {PARAM_STRING, 0, &desc_ChanServ}}}, {"CSAccessMax", {{PARAM_POSINT, PARAM_RELOAD, &CSAccessMax}}}, {"CSAutokickMax", {{PARAM_POSINT, PARAM_RELOAD, &CSAutokickMax}}}, {"CSAutokickReason", @@ -1694,7 +1694,6 @@ int read_config(int reload) CHECK(NetworkName); if (!reload) { CHEK2(temp_userhost, ServiceUser); - CHEK2(s_ChanServ, ChanServName); CHEK2(s_MemoServ, MemoServName); CHEK2(s_HelpServ, HelpServName); CHEK2(s_OperServ, OperServName); |