diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 21:48:55 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 21:48:55 +0000 |
commit | 77c47e06a87a4731960d3f0ac9567857eb531994 (patch) | |
tree | f38123ea911bee7837a89c5e996932f9b888d811 | |
parent | 561096f729f30a81aef5269d1691cdb4d2bd42a6 (diff) |
Added newscount directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1735 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | data/example_new.conf | 6 | ||||
-rw-r--r-- | src/config.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index 0df50aab9..8b8c78316 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -454,6 +454,12 @@ options { * Anope for the first time. */ #restrictopernicks = yes + + /* + * The number of LOGON/OPER news items to display when a user logs on. + * This directive is optional, if left out, defaults to 3. + */ + #newscount = 3 } /* diff --git a/src/config.c b/src/config.c index 9e474d089..32102ed1d 100644 --- a/src/config.c +++ b/src/config.c @@ -672,6 +672,7 @@ int ServerConfig::Read(bool bail) {"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}, + {"options", "newscount", "3", new ValueContainerInt(&NewsCount), DT_INTEGER, 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}, @@ -1395,7 +1396,6 @@ Directive directives[] = { {"MysqlRetries", {{PARAM_POSINT, PARAM_RELOAD, &MysqlRetries}}}, {"MysqlRetryGap", {{PARAM_POSINT, PARAM_RELOAD, &MysqlRetryGap}}}, {"ModuleAutoload", {{PARAM_STRING, PARAM_RELOAD, &Modules}}}, - {"NewsCount", {{PARAM_POSINT, PARAM_RELOAD, &NewsCount}}}, {"RemoteServer2", {{PARAM_STRING, 0, &RemoteServer2}, {PARAM_PORT, 0, &RemotePort2}, {PARAM_STRING, 0, &RemotePassword2}}}, @@ -1747,10 +1747,6 @@ int read_config(int reload) if (!hadAutoop) NSDefFlags |= NI_AUTOOP; } - if (!NewsCount) { - NewsCount = 3; - } - if (reload) { if ((NSDefLanguage = langlist[NSDefLanguage]) < 0) NSDefLanguage = DEF_LANGUAGE; |