summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf6
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 8a76f79cb..224746c67 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -857,4 +857,10 @@ operserv
* optional.
*/
addakiller = yes
+
+ /*
+ * If set, only IRC Operators will be permitted to use OperServ, regardless of module-based command
+ * access restrictions. This directive is optional, but recommended.
+ */
+ opersonly = yes
}
diff --git a/include/extern.h b/include/extern.h
index fc39cffaf..b9b03c3c5 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -872,7 +872,7 @@ E int check_szline(const char *nick, char *ip);
E Server *server_global(Server * s, char *msg);
-E int OSOpersOnly;
+E bool OSOpersOnly;
E time_t DefContimer;
E void runDefCon(void);
E int defconParseModeString(const char *str);
diff --git a/src/config.c b/src/config.c
index c7825a5e1..660b69052 100644
--- a/src/config.c
+++ b/src/config.c
@@ -227,7 +227,7 @@ char *ExceptionDBName;
char *SessionLimitExceeded;
char *SessionLimitDetailsLoc;
-int OSOpersOnly;
+bool OSOpersOnly;
char *Modules;
char *ModulesDelayed;
@@ -677,6 +677,7 @@ int ServerConfig::Read(bool bail)
{"operserv", "maxsessionkill", "0", new ValueContainerInt(&MaxSessionKill), DT_INTEGER, NoValidation},
{"operserv", "sessionautokillexpiry", "0", new ValueContainerTime(&SessionAutoKillExpiry), DT_TIME, NoValidation},
{"operserv", "addakiller", "no", new ValueContainerBool(&AddAkiller), DT_BOOLEAN, NoValidation},
+ {"opserver", "opersonly", "no", new ValueContainerBool(&OSOpersOnly), 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
@@ -1323,7 +1324,6 @@ Directive directives[] = {
{"ServerDesc", {{PARAM_STRING, 0, &ServerDesc}}},
{"ServerName", {{PARAM_STRING, 0, &ServerName}}},
{"ServiceUser", {{PARAM_STRING, 0, &temp_userhost}}},
- {"OSOpersOnly", {{PARAM_SET, PARAM_RELOAD, &OSOpersOnly}}},
{"HideStatsO", {{PARAM_SET, PARAM_RELOAD, &HideStatsO}}},
{"GlobalOnCycle", {{PARAM_SET, PARAM_RELOAD, &GlobalOnCycle}}},
{"AnonymousGlobal", {{PARAM_SET, PARAM_RELOAD, &AnonymousGlobal}}},