summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--degesch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/degesch.c b/degesch.c
index 951f296..b33a0a2 100644
--- a/degesch.c
+++ b/degesch.c
@@ -2643,8 +2643,8 @@ init_buffers (struct app_context *ctx)
server->name = xstrdup ("server");
server->server = &ctx->server;
- LIST_APPEND_WITH_TAIL (ctx->buffers, ctx->buffers_tail, global);
- LIST_APPEND_WITH_TAIL (ctx->buffers, ctx->buffers_tail, server);
+ buffer_add (ctx, global);
+ buffer_add (ctx, server);
}
// --- Users, channels ---------------------------------------------------------
@@ -2694,8 +2694,9 @@ irc_get_or_make_user_buffer (struct server *s, const char *nickname)
buffer->name = xstrdup (nickname);
buffer->server = s;
buffer->user = user;
- LIST_APPEND_WITH_TAIL (s->ctx->buffers, s->ctx->buffers_tail, buffer);
str_map_set (&s->irc_buffer_map, user->nickname, buffer);
+
+ buffer_add (s->ctx, buffer);
return buffer;
}
@@ -3674,9 +3675,9 @@ irc_handle_join (struct server *s, const struct irc_message *msg)
buffer->server = s;
buffer->channel = channel =
irc_make_channel (s, xstrdup (channel_name));
- LIST_APPEND_WITH_TAIL (s->ctx->buffers, s->ctx->buffers_tail, buffer);
str_map_set (&s->irc_buffer_map, channel->name, buffer);
+ buffer_add (s->ctx, buffer);
buffer_activate (s->ctx, buffer);
}