summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf5
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index c935cb497..7e640f199 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -427,4 +427,9 @@ chanserv
* channel. This directive is optional.
*/
#restrictgetpass = yes
+
+ /*
+ * Allow only IRC Operators to use ChanServ. This directive is optional.
+ */
+ #opersonly = yes
}
diff --git a/include/extern.h b/include/extern.h
index eda766689..d52145275 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -352,7 +352,7 @@ E time_t CSInhabit;
E bool CSListOpersOnly;
E int CSListMax;
E bool CSRestrictGetPass;
-E int CSOpersOnly;
+E bool CSOpersOnly;
E int MSMaxMemos;
E int MSSendDelay;
diff --git a/src/config.c b/src/config.c
index fdfdef402..22c4bd862 100644
--- a/src/config.c
+++ b/src/config.c
@@ -154,7 +154,7 @@ time_t CSInhabit;
bool CSListOpersOnly;
int CSListMax;
bool CSRestrictGetPass;
-int CSOpersOnly;
+bool CSOpersOnly;
int MSMaxMemos;
int MSSendDelay;
@@ -593,6 +593,7 @@ int ServerConfig::Read(bool bail)
{"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},
+ {"chanserv", "opersonly", "no", new ValueContainerBool(&CSOpersOnly), 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
@@ -1194,7 +1195,6 @@ Directive directives[] = {
{"HostServName", {{PARAM_STRING, 0, &s_HostServ},
{PARAM_STRING, 0, &desc_HostServ}}},
{"ChanCoreModules", {{PARAM_STRING, PARAM_RELOAD, &ChanCoreModules}}},
- {"CSOpersOnly", {{PARAM_SET, PARAM_RELOAD, &CSOpersOnly}}},
{"DefSessionLimit", {{PARAM_POSINT, 0, &DefSessionLimit}}},
{"DisableRaw", {{PARAM_SET, PARAM_RELOAD, &DisableRaw}}},
{"DontQuoteAddresses",