From 4c811128402375945bccd9833f0db6036e882923 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Mon, 10 Aug 2015 07:39:43 +0200 Subject: degesch: show CTCPs to channels as such --- degesch.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/degesch.c b/degesch.c index 2332690..889d989 100644 --- a/degesch.c +++ b/degesch.c @@ -5582,9 +5582,13 @@ irc_handle_ctcp_request (struct server *s, return; } - // TODO: eventually "requested by #n (to ##channel)" - log_server_status (s, s->buffer, - "CTCP requested by #n: #S", msg->prefix, chunk->tag.str); + struct formatter f; + formatter_init (&f, s->ctx, s); + formatter_add (&f, "CTCP requested by #n", msg->prefix); + if (irc_is_channel (s, target)) + formatter_add (&f, " (to #S)", target); + formatter_add (&f, ": #S", chunk->tag.str); + log_formatter (s->ctx, s->buffer, BUFFER_LINE_STATUS, &f); char *nickname = irc_cut_nickname (msg->prefix); -- cgit v1.2.3-70-g09d2