summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf6
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index e1ba52176..f61515b46 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -560,4 +560,10 @@ botserv
* time, you should not enable this on larger networks. This directive is optional.
*/
#smartjoin = yes
+
+ /*
+ * If set, the bots will use a kick reason that does not retake the word when it is kicking.
+ * This is especially useful if you have young people on your network.
+ */
+ gentlebadwordreason = yes
}
diff --git a/include/extern.h b/include/extern.h
index 423e93926..131eefe59 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -364,7 +364,7 @@ E time_t BSKeepData;
E int BSMinUsers;
E int BSBadWordsMax;
E bool BSSmartJoin;
-E int BSGentleBWReason;
+E bool BSGentleBWReason;
E int BSCaseSensitive;
E char *BSFantasyCharacter;
diff --git a/src/config.c b/src/config.c
index 2cc3220fd..8acbe7486 100644
--- a/src/config.c
+++ b/src/config.c
@@ -167,7 +167,7 @@ time_t BSKeepData;
int BSMinUsers;
int BSBadWordsMax;
bool BSSmartJoin;
-int BSGentleBWReason;
+bool BSGentleBWReason;
int BSCaseSensitive;
char *BSFantasyCharacter;
@@ -617,6 +617,7 @@ int ServerConfig::Read(bool bail)
{"botserv", "badwordsmax", "0", new ValueContainerInt(&BSBadWordsMax), DT_INTEGER, ValidateBotServ},
{"botserv", "keepdata", "0", new ValueContainerTime(&BSKeepData), DT_TIME, ValidateBotServ},
{"botserv", "smartjoin", "no", new ValueContainerBool(&BSSmartJoin), DT_BOOLEAN, NoValidation},
+ {"botserv", "gentlebadwordreason", "no", new ValueContainerBool(&BSGentleBWReason), 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
@@ -1200,7 +1201,6 @@ Directive directives[] = {
{"BSCaseSensitive", {{PARAM_SET, PARAM_RELOAD, &BSCaseSensitive}}},
{"BSFantasyCharacter",
{{PARAM_STRING, PARAM_RELOAD, &BSFantasyCharacter}}},
- {"BSGentleBWReason", {{PARAM_SET, PARAM_RELOAD, &BSGentleBWReason}}},
{"HostServDB", {{PARAM_STRING, PARAM_RELOAD, &HostDBName}}},
{"HostServName", {{PARAM_STRING, 0, &s_HostServ},
{PARAM_STRING, 0, &desc_HostServ}}},