aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-05-15 19:49:25 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-05-15 19:49:25 +0200
commit76b0c13adc0c25533dfc6f8a9e783fd81cfda358 (patch)
treee8639827a0d586a10031168d98ad9428474cd850
parent14df801f5326aba7f71505b21b9193d3f033f41c (diff)
downloadxK-76b0c13adc0c25533dfc6f8a9e783fd81cfda358.tar.gz
xK-76b0c13adc0c25533dfc6f8a9e783fd81cfda358.tar.xz
xK-76b0c13adc0c25533dfc6f8a9e783fd81cfda358.zip
degesch: actually use buffer_add()
-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);
}