degesch: actually use buffer_add()

This commit is contained in:
Přemysl Eric Janouch 2015-05-15 19:49:25 +02:00
parent 14df801f53
commit 76b0c13adc

View File

@ -2643,8 +2643,8 @@ init_buffers (struct app_context *ctx)
server->name = xstrdup ("server"); server->name = xstrdup ("server");
server->server = &ctx->server; server->server = &ctx->server;
LIST_APPEND_WITH_TAIL (ctx->buffers, ctx->buffers_tail, global); buffer_add (ctx, global);
LIST_APPEND_WITH_TAIL (ctx->buffers, ctx->buffers_tail, server); buffer_add (ctx, server);
} }
// --- Users, channels --------------------------------------------------------- // --- Users, channels ---------------------------------------------------------
@ -2694,8 +2694,9 @@ irc_get_or_make_user_buffer (struct server *s, const char *nickname)
buffer->name = xstrdup (nickname); buffer->name = xstrdup (nickname);
buffer->server = s; buffer->server = s;
buffer->user = user; 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); str_map_set (&s->irc_buffer_map, user->nickname, buffer);
buffer_add (s->ctx, buffer);
return buffer; return buffer;
} }
@ -3674,9 +3675,9 @@ irc_handle_join (struct server *s, const struct irc_message *msg)
buffer->server = s; buffer->server = s;
buffer->channel = channel = buffer->channel = channel =
irc_make_channel (s, xstrdup (channel_name)); 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); str_map_set (&s->irc_buffer_map, channel->name, buffer);
buffer_add (s->ctx, buffer);
buffer_activate (s->ctx, buffer); buffer_activate (s->ctx, buffer);
} }