From 9914c013b4ecaa65249f773afdd9ed4179810a8d Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Tue, 31 Dec 2019 01:34:06 +0000 Subject: [PATCH] Add general::hide_tkdline_duration --- include/s_conf.h | 1 + ircd/newconf.c | 1 + ircd/s_conf.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/s_conf.h b/include/s_conf.h index 88a41c3e..c1c93495 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -178,6 +178,7 @@ struct config_file_entry int ts_warn_delta; int dline_with_reason; int kline_with_reason; + int hide_tkdline_duration; int warn_no_nline; int nick_delay; int non_redundant_klines; diff --git a/ircd/newconf.c b/ircd/newconf.c index e3769e7f..bf87c093 100644 --- a/ircd/newconf.c +++ b/ircd/newconf.c @@ -2757,6 +2757,7 @@ static struct ConfEntry conf_general_table[] = { "hide_spoof_ips", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_spoof_ips }, { "dline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.dline_with_reason }, { "kline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.kline_with_reason }, + { "hide_tkdline_duration", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_tkdline_duration }, { "map_oper_only", CF_YESNO, NULL, 0, &ConfigFileEntry.map_oper_only }, { "max_accept", CF_INT, NULL, 0, &ConfigFileEntry.max_accept }, { "max_monitor", CF_INT, NULL, 0, &ConfigFileEntry.max_monitor }, diff --git a/ircd/s_conf.c b/ircd/s_conf.c index 700b8f7d..7a166363 100644 --- a/ircd/s_conf.c +++ b/ircd/s_conf.c @@ -1326,7 +1326,8 @@ get_user_ban_reason(struct ConfItem *aconf) { static char reasonbuf[BUFSIZE]; - if (aconf->flags & CONF_FLAGS_TEMPORARY && + if (!ConfigFileEntry.hide_tkdline_duration && + aconf->flags & CONF_FLAGS_TEMPORARY && (aconf->status == CONF_KILL || aconf->status == CONF_DLINE)) snprintf(reasonbuf, sizeof reasonbuf, "Temporary %c-line %d min. - ",