diff options
author | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-13 23:16:21 +0000 |
---|---|---|
committer | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-13 23:16:21 +0000 |
commit | 7b8ada2efd1c6a3e92460010a9025ae0c9507066 (patch) | |
tree | 8d9312fbe3deb6ca64b061beba87523346d4a174 | |
parent | f25b4376911ab2f92e7990b59f032af58cb3da19 (diff) |
Added restrictgetpass directive to chanserv block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1442 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | data/example_new.conf | 6 | ||||
-rw-r--r-- | include/extern.h | 2 | ||||
-rw-r--r-- | src/config.c | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index 7cc2cdb0c..c935cb497 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -421,4 +421,10 @@ chanserv * The maximum number of channels to be returned for a ChanServ LIST command. */ listmax = 50 + + /* + * If set, Services will only allow Services Root(s) to use the ChanServ GETPASS command on a + * channel. This directive is optional. + */ + #restrictgetpass = yes } diff --git a/include/extern.h b/include/extern.h index eaac2fb50..eda766689 100644 --- a/include/extern.h +++ b/include/extern.h @@ -351,7 +351,7 @@ E char *CSAutokickReason; E time_t CSInhabit; E bool CSListOpersOnly; E int CSListMax; -E int CSRestrictGetPass; +E bool CSRestrictGetPass; E int CSOpersOnly; E int MSMaxMemos; diff --git a/src/config.c b/src/config.c index 983fd16fa..fdfdef402 100644 --- a/src/config.c +++ b/src/config.c @@ -153,7 +153,7 @@ char *CSAutokickReason; time_t CSInhabit; bool CSListOpersOnly; int CSListMax; -int CSRestrictGetPass; +bool CSRestrictGetPass; int CSOpersOnly; int MSMaxMemos; @@ -592,6 +592,7 @@ int ServerConfig::Read(bool bail) {"chanserv", "inhabit", "0", new ValueContainerTime(&CSInhabit), DT_TIME, ValidateNotZero}, {"chanserv", "listopersonly", "no", new ValueContainerBool(&CSListOpersOnly), DT_BOOLEAN, NoValidation}, {"chanserv", "listmax", "0", new ValueContainerInt(&CSListMax), DT_INTEGER, ValidateNotZero}, + {"chanserv", "restrictgetpass", "no", new ValueContainerBool(&CSRestrictGetPass), DT_BOOLEAN, NoValidation}, {NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation} }; /* These tags can occur multiple times, and therefore they have special code to read them @@ -1193,7 +1194,6 @@ Directive directives[] = { {"HostServName", {{PARAM_STRING, 0, &s_HostServ}, {PARAM_STRING, 0, &desc_HostServ}}}, {"ChanCoreModules", {{PARAM_STRING, PARAM_RELOAD, &ChanCoreModules}}}, - {"CSRestrictGetPass", {{PARAM_SET, PARAM_RELOAD, &CSRestrictGetPass}}}, {"CSOpersOnly", {{PARAM_SET, PARAM_RELOAD, &CSOpersOnly}}}, {"DefSessionLimit", {{PARAM_POSINT, 0, &DefSessionLimit}}}, {"DisableRaw", {{PARAM_SET, PARAM_RELOAD, &DisableRaw}}}, |