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 bb4baa938..0cb6c9811 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -724,4 +724,11 @@ operserv sglineexpiry = 30d sqlineexpiry = 30d szlineexpiry = 30d + + /* + * If set, this option will make Services send an AKILL command immediately after it has been + * added with AKILL ADD. This eliminates the need for killing the user after the AKILL has + * been added. This directive is optional. + */ + #akillonadd = yes } diff --git a/include/extern.h b/include/extern.h index ba113d6c5..13bc85894 100644 --- a/include/extern.h +++ b/include/extern.h @@ -383,7 +383,7 @@ E time_t ChankillExpiry; E time_t SGLineExpiry; E time_t SQLineExpiry; E time_t SZLineExpiry; -E int AkillOnAdd; +E bool AkillOnAdd; E int KillonSGline; E int KillonSQline; E int DisableRaw; diff --git a/src/config.c b/src/config.c index 44f17dd50..9914b6d2b 100644 --- a/src/config.c +++ b/src/config.c @@ -189,7 +189,7 @@ time_t ChankillExpiry; time_t SGLineExpiry; time_t SQLineExpiry; time_t SZLineExpiry; -int AkillOnAdd; +bool AkillOnAdd; int KillonSGline; int KillonSQline; int WallOper; @@ -652,6 +652,7 @@ int ServerConfig::Read(bool bail) {"operserv", "sglineexpiry", "0", new ValueContainerTime(&SGLineExpiry), DT_TIME, ValidateNotZero}, {"operserv", "sqlineexpiry", "0", new ValueContainerTime(&SQLineExpiry), DT_TIME, ValidateNotZero}, {"operserv", "szlineexpiry", "0", new ValueContainerTime(&SZLineExpiry), DT_TIME, ValidateNotZero}, + {"operserv", "akillonadd", "no", new ValueContainerBool(&AkillOnAdd), 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 @@ -1225,7 +1226,6 @@ bool ValueItem::GetBool() /*************************************************************************/ Directive directives[] = { - {"AkillOnAdd", {{PARAM_SET, PARAM_RELOAD, &AkillOnAdd}}}, {"BadPassLimit", {{PARAM_POSINT, PARAM_RELOAD, &BadPassLimit}}}, {"BadPassTimeout", {{PARAM_TIME, PARAM_RELOAD, &BadPassTimeout}}}, {"BotCoreModules", {{PARAM_STRING, PARAM_RELOAD, &BotCoreModules}}}, |