Show d/kline setter to opers in stats/testline.

This commit is contained in:
Jilles Tjoelker 2010-03-06 22:37:42 +01:00
parent 03ad38143b
commit f8cebd00f2
1 changed files with 9 additions and 2 deletions

View File

@ -1322,15 +1322,22 @@ get_printable_kline(struct Client *source_p, struct ConfItem *aconf,
char **user, char **oper_reason) char **user, char **oper_reason)
{ {
static char null[] = "<NULL>"; static char null[] = "<NULL>";
static char operreasonbuf[BUFSIZE];
*host = EmptyString(aconf->host) ? null : aconf->host; *host = EmptyString(aconf->host) ? null : aconf->host;
*user = EmptyString(aconf->user) ? null : aconf->user; *user = EmptyString(aconf->user) ? null : aconf->user;
*reason = get_user_ban_reason(aconf); *reason = get_user_ban_reason(aconf);
if(EmptyString(aconf->spasswd) || !IsOper(source_p)) if(!IsOper(source_p))
*oper_reason = NULL; *oper_reason = NULL;
else 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;
}
} }
/* /*