summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf12
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
3 files changed, 15 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index bac2a087e..0df50aab9 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -442,6 +442,18 @@ options {
* for at least the given number of seconds. This directive is optional.
*/
#nickregdelay = 30
+
+ /*
+ * If set, forbids the registration of nicks that contain an existing
+ * nick with Services access. For example, if Tester is a Services Oper,
+ * you can't register NewTester or Tester123 unless you are an IRC
+ * Operator. This directive is optional.
+ *
+ * NOTE: If you enable this, you will have to be logged in as an IRC
+ * operator in order to register a Services Root nick when setting up
+ * Anope for the first time.
+ */
+ #restrictopernicks = yes
}
/*
diff --git a/include/extern.h b/include/extern.h
index 624c59f35..581ffdbe7 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -301,7 +301,7 @@ E bool DumpCore;
E bool LogUsers;
E int NickRegDelay;
E int UseSVSHOLD;
-E int RestrictOperNicks;
+E bool RestrictOperNicks;
E int NewsCount;
E char *Numeric;
E int UnRestrictSAdmin;
diff --git a/src/config.c b/src/config.c
index d611084e8..9e474d089 100644
--- a/src/config.c
+++ b/src/config.c
@@ -171,7 +171,7 @@ char *BSFantasyCharacter;
bool HideStatsO;
bool GlobalOnCycle;
bool AnonymousGlobal;
-int RestrictOperNicks;
+bool RestrictOperNicks;
char *GlobalOnCycleMessage;
char *GlobalOnCycleUP;
static char *ServicesRoot;
@@ -671,6 +671,7 @@ int ServerConfig::Read(bool bail)
{"options", "globaloncycleup", "", new ValueContainerChar(&GlobalOnCycleUP), DT_CHARPTR, ValidateGlobalOnCycle},
{"options", "anonymousglobal", "no", new ValueContainerBool(&AnonymousGlobal), DT_BOOLEAN, NoValidation},
{"options", "nickregdelay", "0", new ValueContainerInt(&NickRegDelay), DT_INTEGER, NoValidation},
+ {"options", "restrictopernicks", "no", new ValueContainerBool(&RestrictOperNicks), DT_BOOLEAN, NoValidation},
{"nickserv", "nick", "NickServ", new ValueContainerChar(&s_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},
@@ -1401,7 +1402,6 @@ Directive directives[] = {
{"RemoteServer3", {{PARAM_STRING, 0, &RemoteServer3},
{PARAM_PORT, 0, &RemotePort3},
{PARAM_STRING, 0, &RemotePassword3}}},
- {"RestrictOperNicks", {{PARAM_SET, PARAM_RELOAD, &RestrictOperNicks}}},
{"UseSVSHOLD", {{PARAM_SET, PARAM_RELOAD, &UseSVSHOLD}}},
{"UseTS6", {{PARAM_SET, 0, &UseTS6}}},
{"UnRestrictSAdmin", {{PARAM_SET, PARAM_RELOAD, &UnRestrictSAdmin}}},