From 3a57bb0659a609ed446977ce0d6c60c7b1c20fee Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 21 Feb 2009 09:58:32 +0100 Subject: [PATCH] Fix bug with buffer name/short_name when IRC query name has changed (remote nick has changed) (bug #25654) --- src/plugins/irc/irc-protocol.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 5ff622422..909cfa42c 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -630,7 +630,7 @@ irc_protocol_cmd_nick (struct t_irc_server *server, const char *command, { struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick; - char *new_nick, *old_color; + char *new_nick, *old_color, *buffer_name; int local_nick; /* NICK message looks like: @@ -659,9 +659,11 @@ irc_protocol_cmd_nick (struct t_irc_server *server, const char *command, { free (ptr_channel->name); ptr_channel->name = strdup (new_nick); - weechat_buffer_set (ptr_channel->buffer, "name", new_nick); + buffer_name = irc_buffer_build_name (server->name, ptr_channel->name); + weechat_buffer_set (ptr_channel->buffer, "name", buffer_name); + weechat_buffer_set (ptr_channel->buffer, "short_name", ptr_channel->name); weechat_buffer_set (ptr_channel->buffer, - "localvar_set_channel", new_nick); + "localvar_set_channel", ptr_channel->name); } break; case IRC_CHANNEL_TYPE_CHANNEL: