diff options
-rw-r--r-- | data/example_new.conf | 7 | ||||
-rw-r--r-- | include/extern.h | 2 | ||||
-rw-r--r-- | src/config.c | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index 1bbe22165..b4784a141 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -361,6 +361,13 @@ options { * This directive is optional, but recommended. */ keepbackups = 3 + + /* + * If set, Services will require a reason when a FORBID is added, else the + * reason is optional. This directive also applies to SUSPENDed channels as + * well. This directive is optional. + */ + forceforbidreason = yes } /* diff --git a/include/extern.h b/include/extern.h index 9077983e6..36001911c 100644 --- a/include/extern.h +++ b/include/extern.h @@ -294,7 +294,7 @@ E time_t WarningTimeout; E time_t TimeoutCheck; E int KeepLogs; E int KeepBackups; -E int ForceForbidReason; +E bool ForceForbidReason; E int UsePrivmsg; E int UseStrictPrivMsg; E int DumpCore; diff --git a/src/config.c b/src/config.c index cea517705..2f69b67b7 100644 --- a/src/config.c +++ b/src/config.c @@ -96,7 +96,7 @@ time_t WarningTimeout; time_t TimeoutCheck; int KeepLogs; int KeepBackups; -int ForceForbidReason; +bool ForceForbidReason; int UsePrivmsg; int UseStrictPrivMsg; int DumpCore; @@ -649,6 +649,7 @@ int ServerConfig::Read(bool bail) {"options", "timeoutcheck", "0", new ValueContainerTime(&TimeoutCheck), DT_TIME, NoValidation}, {"options", "keeplogs", "0", new ValueContainerInt(&KeepLogs), DT_INTEGER, NoValidation}, {"options", "keepbackups", "0", new ValueContainerInt(&KeepBackups), DT_INTEGER, NoValidation}, + {"options", "forceforbidreason", "no", new ValueContainerBool(&ForceForbidReason), 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}, @@ -1361,7 +1362,6 @@ bool ValueItem::GetBool() Directive directives[] = { {"DumpCore", {{PARAM_SET, 0, &DumpCore}}}, - {"ForceForbidReason", {{PARAM_SET, PARAM_RELOAD, &ForceForbidReason}}}, {"LocalAddress", {{PARAM_STRING, 0, &LocalHost}, {PARAM_PORT, PARAM_OPTIONAL, &LocalPort}}}, {"LogUsers", {{PARAM_SET, PARAM_RELOAD, &LogUsers}}}, |