If stats k is masked for nonopers, treat stats k and K the same.
There is no point in forcing two stats requests for just one line of information.
This commit is contained in:
parent
de82e84fae
commit
0a621c4b5b
1 changed files with 4 additions and 7 deletions
|
@ -637,8 +637,8 @@ stats_tklines(struct Client *source_p)
|
||||||
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
|
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSKLINE,
|
sendto_one_numeric(source_p, RPL_STATSKLINE,
|
||||||
form_str(RPL_STATSKLINE), 'k',
|
form_str(RPL_STATSKLINE), aconf->flags & CONF_FLAGS_TEMPORARY ? 'k' : 'K',
|
||||||
user, pass, oper_reason ? "|" : "",
|
host, user, pass, oper_reason ? "|" : "",
|
||||||
oper_reason ? oper_reason : "");
|
oper_reason ? oper_reason : "");
|
||||||
}
|
}
|
||||||
/* Theyre opered, or allowed to see all klines */
|
/* Theyre opered, or allowed to see all klines */
|
||||||
|
@ -696,14 +696,11 @@ stats_klines(struct Client *source_p)
|
||||||
if(aconf == NULL)
|
if(aconf == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* dont report a tkline as a kline */
|
|
||||||
if(aconf->flags & CONF_FLAGS_TEMPORARY)
|
|
||||||
return;
|
|
||||||
|
|
||||||
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
|
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSKLINE, form_str(RPL_STATSKLINE),
|
sendto_one_numeric(source_p, RPL_STATSKLINE, form_str(RPL_STATSKLINE),
|
||||||
'K', host, user, pass, oper_reason ? "|" : "",
|
aconf->flags & CONF_FLAGS_TEMPORARY ? 'k' : 'K',
|
||||||
|
host, user, pass, oper_reason ? "|" : "",
|
||||||
oper_reason ? oper_reason : "");
|
oper_reason ? oper_reason : "");
|
||||||
}
|
}
|
||||||
/* Theyre opered, or allowed to see all klines */
|
/* Theyre opered, or allowed to see all klines */
|
||||||
|
|
Loading…
Reference in a new issue