summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-27 22:59:23 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-27 22:59:23 +0200
commit0cb50addbeb03793df649184fb90cdbc7618857c (patch)
treef0480a34593a38e5db104ad2a8ecbe44900a1375 /degesch.c
parent412cad9328ec3cd7f1e918a98a7e1df5c0aed97d (diff)
downloadxK-0cb50addbeb03793df649184fb90cdbc7618857c.tar.gz
xK-0cb50addbeb03793df649184fb90cdbc7618857c.tar.xz
xK-0cb50addbeb03793df649184fb90cdbc7618857c.zip
degesch: make sure "You are now known..." works
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/degesch.c b/degesch.c
index 1d5e3ee..4e7b3d6 100644
--- a/degesch.c
+++ b/degesch.c
@@ -2640,8 +2640,11 @@ irc_handle_nick (struct app_context *ctx, const struct irc_message *msg)
str_map_set (&ctx->irc_buffer_map, new_nickname, pm_buffer);
str_map_set (&ctx->irc_buffer_map, user->nickname, NULL);
+ char *who = irc_is_this_us (ctx, msg->prefix)
+ ? irc_to_utf8 (ctx, msg->prefix)
+ : NULL;
buffer_send (ctx, pm_buffer, BUFFER_LINE_NICK, 0,
- .who = irc_to_utf8 (ctx, msg->prefix),
+ .who = who,
.object = irc_to_utf8 (ctx, new_nickname));
// TODO: use a full weechat-style buffer name here
buffer_rename (ctx, pm_buffer, new_nickname);