diff options
-rw-r--r-- | data/example_new.conf | 6 | ||||
-rw-r--r-- | include/extern.h | 2 | ||||
-rw-r--r-- | src/config.c | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index 6f7c3ceb7..935e2aed5 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -372,4 +372,10 @@ chanserv * can have registered. */ maxregistered = 20 + + /* + * The length of time before a channel registration expires. This directive is optional, but + * recommended. If not set, the default is 14 days. + */ + expire = 14d } diff --git a/include/extern.h b/include/extern.h index 44f489fdd..32dc35cfe 100644 --- a/include/extern.h +++ b/include/extern.h @@ -343,7 +343,7 @@ E bool NSAddAccessOnReg; E int CSDefFlags; E int CSMaxReg; -E int CSExpire; +E time_t CSExpire; E int CSDefBantype; E int CSAccessMax; E int CSAutokickMax; diff --git a/src/config.c b/src/config.c index 60cd216f6..d0fce64e1 100644 --- a/src/config.c +++ b/src/config.c @@ -145,7 +145,7 @@ bool NSAddAccessOnReg; static std::string CSDefaults; int CSDefFlags; int CSMaxReg; -int CSExpire; +time_t CSExpire; int CSDefBantype; int CSAccessMax; int CSAutokickMax; @@ -555,7 +555,7 @@ int ServerConfig::Read(bool bail) {"nickserv", "defaultlanguage", "0", new ValueContainerInt(&NSDefLanguage), DT_INTEGER, ValidateLanguage}, {"nickserv", "regdelay", "0", new ValueContainerTime(&NSRegDelay), DT_TIME, NoValidation}, {"nickserv", "resenddelay", "0", new ValueContainerTime(&NSResendDelay), DT_TIME, NoValidation}, - {"nickserv", "expire", "21d", new ValueContainerTime(&NSExpire), DT_TIME, ValidateNotZero}, + {"nickserv", "expire", "21d", new ValueContainerTime(&NSExpire), DT_TIME, NoValidation}, {"nickserv", "preregexpire", "0", new ValueContainerTime(&NSRExpire), DT_TIME, ValidateEmailReg}, {"nickserv", "maxaliases", "0", new ValueContainerInt(&NSMaxAliases), DT_INTEGER, NoValidation}, {"nickserv", "accessmax", "0", new ValueContainerInt(&NSAccessMax), DT_INTEGER, ValidateNotZero}, @@ -577,6 +577,7 @@ int ServerConfig::Read(bool bail) {"chanserv", "database", "chan.db", new ValueContainerChar(&ChanDBName), DT_CHARPTR, ValidateNotEmpty}, {"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}, {NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation} }; /* These tags can occur multiple times, and therefore they have special code to read them @@ -1183,7 +1184,6 @@ Directive directives[] = { {"CSAutokickReason", {{PARAM_STRING, PARAM_RELOAD, &CSAutokickReason}}}, {"CSDefBantype", {{PARAM_INT, PARAM_RELOAD, &CSDefBantype}}}, - {"CSExpire", {{PARAM_TIME, PARAM_RELOAD, &CSExpire}}}, {"CSInhabit", {{PARAM_TIME, PARAM_RELOAD, &CSInhabit}}}, {"CSListMax", {{PARAM_POSINT, PARAM_RELOAD, &CSListMax}}}, {"CSListOpersOnly", {{PARAM_SET, PARAM_RELOAD, &CSListOpersOnly}}}, |