Merge pull request #299 from edk0/tkline-reason
Add config option to hide durations of temporary K/D-lines
This commit is contained in:
commit
5eb10743f9
5 changed files with 10 additions and 1 deletions
|
@ -580,6 +580,7 @@ general {
|
||||||
global_snotices = yes;
|
global_snotices = yes;
|
||||||
dline_with_reason = yes;
|
dline_with_reason = yes;
|
||||||
kline_with_reason = yes;
|
kline_with_reason = yes;
|
||||||
|
hide_tkdline_duration = no;
|
||||||
kline_reason = "K-Lined";
|
kline_reason = "K-Lined";
|
||||||
identify_service = "NickServ@services.int";
|
identify_service = "NickServ@services.int";
|
||||||
identify_command = "IDENTIFY";
|
identify_command = "IDENTIFY";
|
||||||
|
|
|
@ -1178,6 +1178,11 @@ general {
|
||||||
*/
|
*/
|
||||||
kline_with_reason = yes;
|
kline_with_reason = yes;
|
||||||
|
|
||||||
|
/* tkline duration: when showing users their k/dline reason (see
|
||||||
|
* kline_with_reason), don't add "Temporary K-line 123 min."
|
||||||
|
*/
|
||||||
|
hide_tkdline_duration = no;
|
||||||
|
|
||||||
/* kline reason: make the users quit message on channels this
|
/* kline reason: make the users quit message on channels this
|
||||||
* reason instead of the oper's reason.
|
* reason instead of the oper's reason.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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 },
|
||||||
|
|
|
@ -1339,7 +1339,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. - ",
|
||||||
|
|
Loading…
Reference in a new issue