diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-08-10 07:39:43 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-08-10 07:39:43 +0200 |
commit | 4c811128402375945bccd9833f0db6036e882923 (patch) | |
tree | 946e800b964a835f844b2cbac92b3c1bb4e0ccb0 /degesch.c | |
parent | 5dda5661ae95ff14ccf587fa8294ba7153160d9f (diff) | |
download | xK-4c811128402375945bccd9833f0db6036e882923.tar.gz xK-4c811128402375945bccd9833f0db6036e882923.tar.xz xK-4c811128402375945bccd9833f0db6036e882923.zip |
degesch: show CTCPs to channels as such
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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); |