aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-06-03 21:51:35 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-06-03 21:53:14 +0200
commitf53d1adba8e067786fac203f6f402ef1022b1092 (patch)
tree0ab96becd4b564a229d1018fa16b5eba87b8eb09
parent5e4f94c38c2078655a3e314d49926d6b05830ea1 (diff)
downloadxK-f53d1adba8e067786fac203f6f402ef1022b1092.tar.gz
xK-f53d1adba8e067786fac203f6f402ef1022b1092.tar.xz
xK-f53d1adba8e067786fac203f6f402ef1022b1092.zip
degesch: show RPL_NAMREPLY contents
-rw-r--r--degesch.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/degesch.c b/degesch.c
index ffac775..0e1c8e4 100644
--- a/degesch.c
+++ b/degesch.c
@@ -4495,6 +4495,25 @@ irc_process_names (struct server *s, struct channel *channel)
str_map_free (&map);
str_vector_reset (&channel->names_buf);
+
+ struct str_vector v;
+ str_vector_init (&v);
+ LIST_FOR_EACH (struct channel_user, iter, channel->users)
+ str_vector_add_owned (&v,
+ xstrdup_printf ("%s%s", iter->modes, iter->user->nickname));
+ char *all_users = join_str_vector (&v, ' ');
+ str_vector_free (&v);
+
+ // XXX: only do this after joining the channel?
+ struct buffer *buffer = str_map_find (&s->irc_buffer_map, channel->name);
+ if (buffer)
+ {
+ // FIXME: logging
+ buffer_send_status (s->ctx, buffer, "Users on %s: %s",
+ channel->name, all_users);
+ }
+
+ free (all_users);
}
static void