From e19c515ce931a1a5b601b5b4df5fea3cf4ccaadd Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 25 Jan 2009 16:23:36 +0100 Subject: [PATCH] commit 1df4ff0b0558e4698819f8e4ac6ecb7654b81a2c Author: Stephen Bennett Date: Sun Jan 18 16:30:27 2009 +0000 Make testline show oper reason and setter information for K:lines, where applicable --- modules/m_testline.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/m_testline.c b/modules/m_testline.c index 215f48d..ee1cca6 100644 --- a/modules/m_testline.c +++ b/modules/m_testline.c @@ -178,14 +178,19 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch if(aconf->status & CONF_KILL) { + char *user, *host, *reason, *operreason; + char reasonbuf[BUFSIZE]; + get_printable_kline(source_p, aconf, &host, &reason, &user, &operreason); rb_snprintf(buf, sizeof(buf), "%s@%s", - aconf->user, aconf->host); + user, host); + rb_snprintf(reasonbuf, sizeof(reasonbuf), "%s%s%s", reason, + operreason ? "|" : "", operreason ? operreason : ""); sendto_one(source_p, form_str(RPL_TESTLINE), me.name, source_p->name, (aconf->flags & CONF_FLAGS_TEMPORARY) ? 'k' : 'K', (aconf->flags & CONF_FLAGS_TEMPORARY) ? (long) ((aconf->hold - rb_current_time()) / 60) : 0L, - buf, aconf->passwd); + buf, reasonbuf); return 0; } }