diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 21:48:44 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 21:48:44 +0000 |
commit | 561096f729f30a81aef5269d1691cdb4d2bd42a6 (patch) | |
tree | 452320f25f3edb2452945afb494c528f202f0a46 | |
parent | a5ef72b9b4964a8227bf46beb44df098aab87de0 (diff) |
Added restrictopernicks directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1734 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | data/example_new.conf | 12 | ||||
-rw-r--r-- | include/extern.h | 2 | ||||
-rw-r--r-- | src/config.c | 4 |
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}}}, |