From 778dd56bf2974b6edf6eb2cde5a9b59ca9bb64ce Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 6 Mar 2010 22:37:42 +0100 Subject: [PATCH] Show d/kline setter to opers in stats/testline. --- src/s_conf.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/s_conf.c b/src/s_conf.c index 0e9dfa90..946380db 100644 --- a/src/s_conf.c +++ b/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[] = ""; + 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; + } } /*