summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-02-21 09:58:32 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-02-21 09:58:32 +0100
commit3a57bb0659a609ed446977ce0d6c60c7b1c20fee (patch)
tree24c36a1847efb5383d06395f4f88d7c07e48443e
parent517367f88179f899ec70aa2c0302b27e3e1bc0b1 (diff)
downloadweechat-3a57bb0659a609ed446977ce0d6c60c7b1c20fee.zip
Fix bug with buffer name/short_name when IRC query name has changed (remote nick has changed) (bug #25654)
-rw-r--r--src/plugins/irc/irc-protocol.c8
1 files 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: