summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-27 03:14:59 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-27 03:14:59 +0000
commit232d1b5e88c62ef3e2dae4a03353da817a3b89dc (patch)
tree3f92f9f2949a945f8ccd593589ad7410839059a1 /src
parenta9be866804d2020bd59673959b5629b45519e50b (diff)
Added akillreason directive to defcon block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1501 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c
index fa57eca4c..73ac09cb3 100644
--- a/src/config.c
+++ b/src/config.c
@@ -520,7 +520,7 @@ bool ValidateDefCon(ServerConfig *, const char *tag, const char *value, ValueIte
if (level > 5) throw ConfigException("The value for <defcon:defaultlevel> must be between 1 through 5 if you wish to use DefCon or 0 if you wish to disable it!");
}
else if (DefConLevel) {
- if ((static_cast<std::string>(value).substr(0, 5) == "level" && isdigit(value[5])) || static_cast<std::string>(value) == "chanmodes") {
+ if ((static_cast<std::string>(value).substr(0, 5) == "level" && isdigit(value[5])) || static_cast<std::string>(value) == "chanmodes" || static_cast<std::string>(value) == "akillreason") {
if (!*data.GetString()) throw ConfigException(static_cast<std::string>("The value for <") + tag + ":" + value + "> cannot be empty when DefCon is enabled!");
}
else if (static_cast<std::string>(value) == "message" && GlobalOnDefconMore) {
@@ -711,6 +711,7 @@ int ServerConfig::Read(bool bail)
{"defcon", "globalondefconmore", "no", new ValueContainerBool(&GlobalOnDefconMore), DT_BOOLEAN, NoValidation},
{"defcon", "message", "", new ValueContainerChar(&DefconMessage), DT_CHARPTR, ValidateDefCon},
{"defcon", "offmessage", "", new ValueContainerChar(&DefConOffMessage), DT_CHARPTR, NoValidation},
+ {"defcon", "akillreason", "", new ValueContainerChar(&DefConAkillReason), DT_CHARPTR, ValidateDefCon},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -1291,8 +1292,6 @@ Directive directives[] = {
{"DontQuoteAddresses",
{{PARAM_SET, PARAM_RELOAD, &DontQuoteAddresses}}},
{"DumpCore", {{PARAM_SET, 0, &DumpCore}}},
- {"DefConAkillReason",
- {{PARAM_STRING, PARAM_RELOAD, &DefConAkillReason}}},
{"EncModule", {{PARAM_STRING, 0, &EncModule}}},
{"ExpireTimeout", {{PARAM_TIME, PARAM_RELOAD, &ExpireTimeout}}},
{"ForceForbidReason", {{PARAM_SET, PARAM_RELOAD, &ForceForbidReason}}},