summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 21:19:38 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 21:19:38 +0000
commit78b1bc9b0a858a07722101a9c052f5b751105f5b (patch)
tree76b720428e5fc54a5865cd208d16347da29532a4
parentdd4069b50434ce0039a0decafa4541969a84ee8d (diff)
Added hidestatso directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1725 5417fbe8-f217-4b02-8779-1006273d7864
-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 fb1b2d2de..4eb53c85a 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -405,6 +405,12 @@ options {
* information to your local authorities. This directive is optional.
*/
#logusers = yes
+
+ /*
+ * If set, Services will only show /stats o to IRC Operators. This directive
+ * is optional.
+ */
+ #hidestatso = yes
}
/*
diff --git a/include/extern.h b/include/extern.h
index 0288ab7ba..65745d5a4 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -369,7 +369,7 @@ E bool BSGentleBWReason;
E bool BSCaseSensitive;
E char *BSFantasyCharacter;
-E int HideStatsO;
+E bool HideStatsO;
E int GlobalOnCycle;
E int AnonymousGlobal;
E char *GlobalOnCycleMessage;
diff --git a/src/config.c b/src/config.c
index 46cdb9540..d165b676b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -168,7 +168,7 @@ bool BSGentleBWReason;
bool BSCaseSensitive;
char *BSFantasyCharacter;
-int HideStatsO;
+bool HideStatsO;
int GlobalOnCycle;
int AnonymousGlobal;
int RestrictOperNicks;
@@ -654,6 +654,7 @@ int ServerConfig::Read(bool bail)
{"options", "usestrictprivmsg", "no", new ValueContainerBool(&UseStrictPrivMsg), DT_BOOLEAN, NoValidation},
{"options", "dumpcore", "no", new ValueContainerBool(&DumpCore), DT_BOOLEAN | DT_NORELOAD, NoValidation},
{"options", "logusers", "no", new ValueContainerBool(&LogUsers), DT_BOOLEAN, NoValidation},
+ {"options", "hidestatso", "no", new ValueContainerBool(&HideStatsO), 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},
@@ -1386,7 +1387,6 @@ Directive directives[] = {
{PARAM_PORT, 0, &RemotePort3},
{PARAM_STRING, 0, &RemotePassword3}}},
{"RestrictOperNicks", {{PARAM_SET, PARAM_RELOAD, &RestrictOperNicks}}},
- {"HideStatsO", {{PARAM_SET, PARAM_RELOAD, &HideStatsO}}},
{"GlobalOnCycle", {{PARAM_SET, PARAM_RELOAD, &GlobalOnCycle}}},
{"AnonymousGlobal", {{PARAM_SET, PARAM_RELOAD, &AnonymousGlobal}}},
{"GlobalOnCycleMessage",