diff options
author | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-13 22:53:38 +0000 |
---|---|---|
committer | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-13 22:53:38 +0000 |
commit | c4a8ddaa24fc6f5ff8b4a72ac797a93aff6f997e (patch) | |
tree | 8796a58d5eb090c1dca5f6485523cda6c37b4f0b /src | |
parent | 1ed824416627e36f135e5ace4fc745e5a6ae39ae (diff) |
Added defbantype directive to chanserv block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1435 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index d0fce64e1..beebbead5 100644 --- a/src/config.c +++ b/src/config.c @@ -476,6 +476,13 @@ bool ValidateGuestPrefix(ServerConfig *conf, const char *tag, const char *value, return true; } +bool ValidateBantype(ServerConfig *, const char *, const char *, ValueItem &data) +{ + int bantype = data.GetInteger(); + if (bantype < 0 || bantype > 3) throw ConfigException("The value for <chanserv:defbantype> must be between 0 and 3!"); + return true; +} + void ServerConfig::ReportConfigError(const std::string &errormessage, bool bail) { alog("There were errors in your configuration file: %s", errormessage.c_str()); @@ -578,6 +585,7 @@ int ServerConfig::Read(bool bail) {"chanserv", "defaults", "keetopic secure securefounder signkick", new ValueContainerString(&CSDefaults), DT_BOOLEAN, NoValidation}, {"chanserv", "maxregistered", "0", new ValueContainerInt(&CSMaxReg), DT_INTEGER, NoValidation}, {"chanserv", "expire", "14d", new ValueContainerTime(&CSExpire), DT_TIME, NoValidation}, + {"chanserv", "defbantype", "2", new ValueContainerInt(&CSDefBantype), DT_INTEGER, ValidateBantype}, {NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation} }; /* These tags can occur multiple times, and therefore they have special code to read them @@ -1183,7 +1191,6 @@ Directive directives[] = { {"CSAutokickMax", {{PARAM_POSINT, PARAM_RELOAD, &CSAutokickMax}}}, {"CSAutokickReason", {{PARAM_STRING, PARAM_RELOAD, &CSAutokickReason}}}, - {"CSDefBantype", {{PARAM_INT, PARAM_RELOAD, &CSDefBantype}}}, {"CSInhabit", {{PARAM_TIME, PARAM_RELOAD, &CSInhabit}}}, {"CSListMax", {{PARAM_POSINT, PARAM_RELOAD, &CSListMax}}}, {"CSListOpersOnly", {{PARAM_SET, PARAM_RELOAD, &CSListOpersOnly}}}, |