aboutsummaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-21 21:36:44 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-21 21:36:44 +0200
commite8e039c11c937426c5a03e38e95485a2cd57068f (patch)
tree6b0043ef8af51f9b79ac2593aa5a6d373160c853 /degesch.c
parent883e777bacc85b92f460524098ae27b6a8d4d221 (diff)
downloadxK-e8e039c11c937426c5a03e38e95485a2cd57068f.tar.gz
xK-e8e039c11c937426c5a03e38e95485a2cd57068f.tar.xz
xK-e8e039c11c937426c5a03e38e95485a2cd57068f.zip
degesch: non-functional changes
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c13
1 files 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);
}