Add general::hide_tkdline_duration

This commit is contained in:
Ed Kellett 2019-12-31 01:34:06 +00:00
parent 7b8e4c0967
commit 9914c013b4
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC
3 changed files with 4 additions and 1 deletions

View file

@ -178,6 +178,7 @@ struct config_file_entry
int ts_warn_delta; int ts_warn_delta;
int dline_with_reason; int dline_with_reason;
int kline_with_reason; int kline_with_reason;
int hide_tkdline_duration;
int warn_no_nline; int warn_no_nline;
int nick_delay; int nick_delay;
int non_redundant_klines; int non_redundant_klines;

View file

@ -2757,6 +2757,7 @@ static struct ConfEntry conf_general_table[] =
{ "hide_spoof_ips", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_spoof_ips }, { "hide_spoof_ips", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_spoof_ips },
{ "dline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.dline_with_reason }, { "dline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.dline_with_reason },
{ "kline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.kline_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 }, { "map_oper_only", CF_YESNO, NULL, 0, &ConfigFileEntry.map_oper_only },
{ "max_accept", CF_INT, NULL, 0, &ConfigFileEntry.max_accept }, { "max_accept", CF_INT, NULL, 0, &ConfigFileEntry.max_accept },
{ "max_monitor", CF_INT, NULL, 0, &ConfigFileEntry.max_monitor }, { "max_monitor", CF_INT, NULL, 0, &ConfigFileEntry.max_monitor },

View file

@ -1326,7 +1326,8 @@ get_user_ban_reason(struct ConfItem *aconf)
{ {
static char reasonbuf[BUFSIZE]; 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)) (aconf->status == CONF_KILL || aconf->status == CONF_DLINE))
snprintf(reasonbuf, sizeof reasonbuf, snprintf(reasonbuf, sizeof reasonbuf,
"Temporary %c-line %d min. - ", "Temporary %c-line %d min. - ",