Show d/kline setter to opers in stats/testline.
This commit is contained in:
parent
1c42ac3556
commit
778dd56bf2
1 changed files with 9 additions and 2 deletions
11
src/s_conf.c
11
src/s_conf.c
|
@ -1253,15 +1253,22 @@ get_printable_kline(struct Client *source_p, struct ConfItem *aconf,
|
|||
char **user, char **oper_reason)
|
||||
{
|
||||
static char null[] = "<NULL>";
|
||||
static char operreasonbuf[BUFSIZE];
|
||||
|
||||
*host = EmptyString(aconf->host) ? null : aconf->host;
|
||||
*user = EmptyString(aconf->user) ? null : aconf->user;
|
||||
*reason = get_user_ban_reason(aconf);
|
||||
|
||||
if(EmptyString(aconf->spasswd) || !IsOper(source_p))
|
||||
if(!IsOper(source_p))
|
||||
*oper_reason = NULL;
|
||||
else
|
||||
*oper_reason = aconf->spasswd;
|
||||
{
|
||||
rb_snprintf(operreasonbuf, sizeof operreasonbuf, "%s%s(%s)",
|
||||
EmptyString(aconf->spasswd) ? "" : aconf->spasswd,
|
||||
EmptyString(aconf->spasswd) ? "" : " ",
|
||||
aconf->info.oper);
|
||||
*oper_reason = operreasonbuf;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue