commit 1df4ff0b0558e4698819f8e4ac6ecb7654b81a2c

Author: Stephen Bennett <spb@exherbo.org>
Date:   Sun Jan 18 16:30:27 2009 +0000

    Make testline show oper reason and setter information for K:lines, where applicable
This commit is contained in:
Jilles Tjoelker 2009-01-25 16:23:36 +01:00
parent d45f5ea2d9
commit cb2540a673

View file

@ -178,14 +178,19 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch
if(aconf->status & CONF_KILL) 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", 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), sendto_one(source_p, form_str(RPL_TESTLINE),
me.name, source_p->name, me.name, source_p->name,
(aconf->flags & CONF_FLAGS_TEMPORARY) ? 'k' : 'K', (aconf->flags & CONF_FLAGS_TEMPORARY) ? 'k' : 'K',
(aconf->flags & CONF_FLAGS_TEMPORARY) ? (aconf->flags & CONF_FLAGS_TEMPORARY) ?
(long) ((aconf->hold - rb_current_time()) / 60) : 0L, (long) ((aconf->hold - rb_current_time()) / 60) : 0L,
buf, aconf->passwd); buf, reasonbuf);
return 0; return 0;
} }
} }