summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-27 03:04:03 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-27 03:04:03 +0000
commit3d3b03fbc61230c6047c74bb6d29db31f00c0131 (patch)
treec9332ff826f58da7e73b01efbd8d55351f0a3134
parent17fc564ce312d3e14b44d051585fa0145b88bf19 (diff)
Added globalondefconmore directive to defcon block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1498 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf6
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c5
3 files changed, 9 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index d679b72c3..aae44c0eb 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -936,4 +936,10 @@ defcon
* If set, Services will send a global message on DefCon level changes. This directive is optional.
*/
#globalondefcon = yes
+
+ /*
+ * If set, Services will send the global message defined in the message directive on DefCon level
+ * changes. This directive is optional.
+ */
+ #globalondefconmore = yes
}
diff --git a/include/extern.h b/include/extern.h
index ef8502652..0e605d7bb 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -510,7 +510,7 @@ E time_t DefConTimeOut;
E time_t DefConAKILL;
E char *DefConChanModes;
E bool GlobalOnDefcon;
-E int GlobalOnDefconMore;
+E bool GlobalOnDefconMore;
E char *DefconMessage;
E char *DefConAkillReason;
E char *DefConOffMessage;
diff --git a/src/config.c b/src/config.c
index fb3c484e1..f822dbedb 100644
--- a/src/config.c
+++ b/src/config.c
@@ -290,7 +290,7 @@ int DefConSessionLimit;
time_t DefConAKILL;
char *DefConChanModes;
bool GlobalOnDefcon;
-int GlobalOnDefconMore;
+bool GlobalOnDefconMore;
char *DefConOffMessage;
char *DefconMessage;
char *DefConAkillReason;
@@ -705,6 +705,7 @@ int ServerConfig::Read(bool bail)
{"defcon", "chanmodes", "", new ValueContainerChar(&DefConChanModes), DT_CHARPTR, ValidateDefCon},
{"defcon", "timeout", "0", new ValueContainerTime(&DefConTimeOut), DT_TIME, NoValidation},
{"defcon", "globalondefcon", "no", new ValueContainerBool(&GlobalOnDefcon), DT_BOOLEAN, NoValidation},
+ {"defcon", "globalondefconmore", "no", new ValueContainerBool(&GlobalOnDefconMore), DT_BOOLEAN, NoValidation},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -1362,8 +1363,6 @@ Directive directives[] = {
{"UseTS6", {{PARAM_SET, 0, &UseTS6}}},
{"UnRestrictSAdmin", {{PARAM_SET, PARAM_RELOAD, &UnRestrictSAdmin}}},
{"WarningTimeout", {{PARAM_TIME, PARAM_RELOAD, &WarningTimeout}}},
- {"GlobalOnDefconMore",
- {{PARAM_SET, PARAM_RELOAD, &GlobalOnDefconMore}}},
{"DefconMessage", {{PARAM_STRING, PARAM_RELOAD, &DefconMessage}}},
{"UlineServers", {{PARAM_STRING, PARAM_RELOAD, &UlineServers}}},
};