summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 21:19:50 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 21:19:50 +0000
commite696a843fc22244f21008c3bcea3927aa0c86f36 (patch)
treece6b30ff30e4b40e62685354d0f53edfefb258a2
parent78b1bc9b0a858a07722101a9c052f5b751105f5b (diff)
Added globaloncycle directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1726 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf6
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c6
3 files changed, 10 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 4eb53c85a..34ffca9f2 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -411,6 +411,12 @@ options {
* is optional.
*/
#hidestatso = yes
+
+ /*
+ * If set, Services will send global messages on starting up and shutting
+ * down/restarting. This directive is optional.
+ */
+ #globaloncycle = yes
}
/*
diff --git a/include/extern.h b/include/extern.h
index 65745d5a4..a39ec0213 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -370,7 +370,7 @@ E bool BSCaseSensitive;
E char *BSFantasyCharacter;
E bool HideStatsO;
-E int GlobalOnCycle;
+E bool GlobalOnCycle;
E int AnonymousGlobal;
E char *GlobalOnCycleMessage;
E char *GlobalOnCycleUP;
diff --git a/src/config.c b/src/config.c
index d165b676b..85b2b0aee 100644
--- a/src/config.c
+++ b/src/config.c
@@ -169,7 +169,7 @@ bool BSCaseSensitive;
char *BSFantasyCharacter;
bool HideStatsO;
-int GlobalOnCycle;
+bool GlobalOnCycle;
int AnonymousGlobal;
int RestrictOperNicks;
char *GlobalOnCycleMessage;
@@ -655,6 +655,7 @@ int ServerConfig::Read(bool bail)
{"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},
+ {"options", "globaloncycle", "no", new ValueContainerBool(&GlobalOnCycle), 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},
@@ -1387,7 +1388,6 @@ Directive directives[] = {
{PARAM_PORT, 0, &RemotePort3},
{PARAM_STRING, 0, &RemotePassword3}}},
{"RestrictOperNicks", {{PARAM_SET, PARAM_RELOAD, &RestrictOperNicks}}},
- {"GlobalOnCycle", {{PARAM_SET, PARAM_RELOAD, &GlobalOnCycle}}},
{"AnonymousGlobal", {{PARAM_SET, PARAM_RELOAD, &AnonymousGlobal}}},
{"GlobalOnCycleMessage",
{{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleMessage}}},
@@ -1908,7 +1908,7 @@ int read_config(int reload)
if (GlobalOnCycle) {
if (!GlobalOnCycleMessage && !GlobalOnCycleUP) {
alog("GlobalOnCycleMessage and GlobalOnCycleUP are not defined; disabling GlobalOnCycle");
- GlobalOnCycle = 0;
+ GlobalOnCycle = false;
}
}