From e8e039c11c937426c5a03e38e95485a2cd57068f Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Tue, 21 Apr 2015 21:36:44 +0200 Subject: degesch: non-functional changes --- degesch.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/degesch.c b/degesch.c index c4e2385..0cac7d3 100644 --- a/degesch.c +++ b/degesch.c @@ -1865,23 +1865,23 @@ irc_handle_join (struct app_context *ctx, const struct irc_message *msg) if (!msg->prefix || msg->params.len < 1) return; - const char *target = msg->params.vector[0]; - if (!irc_is_channel (ctx, target)) + const char *channel_name = msg->params.vector[0]; + if (!irc_is_channel (ctx, channel_name)) return; - struct channel *channel = str_map_find (&ctx->irc_channels, target); - struct buffer *buffer = str_map_find (&ctx->irc_buffer_map, target); + struct channel *channel = str_map_find (&ctx->irc_channels, channel_name); + struct buffer *buffer = str_map_find (&ctx->irc_buffer_map, channel_name); hard_assert ((channel && buffer) || (channel && !buffer) || (!channel && !buffer)); // We've joined a new channel if (!channel && irc_is_this_us (ctx, msg->prefix)) { - channel = irc_make_channel (ctx, xstrdup (target)); + channel = irc_make_channel (ctx, xstrdup (channel_name)); buffer = buffer_new (); buffer->type = BUFFER_CHANNEL; - buffer->name = xstrdup (target); + buffer->name = xstrdup (channel_name); buffer->channel = channel_ref (channel); LIST_APPEND_WITH_TAIL (ctx->buffers, ctx->buffers_tail, buffer); str_map_set (&ctx->irc_buffer_map, channel->name, buffer); @@ -2124,6 +2124,7 @@ irc_handle_privmsg (struct app_context *ctx, const struct irc_message *msg) if (buffer) { // TODO: handle CTCP messages + // TODO: highlights buffer_send (ctx, buffer, BUFFER_LINE_PRIVMSG, 0, msg->prefix, NULL, "%s", message); } -- cgit v1.2.3-70-g09d2