From a75a947f5f11650ea28380f9d39af02585347e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 19 Jun 2024 21:43:08 +0200 Subject: [PATCH] irc: fix apply of custom buffer property "short_name" when a channel buffer is renamed --- src/plugins/irc/irc-channel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 3a8778f31..0c4e16e2e 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -252,10 +252,17 @@ irc_channel_create_buffer (struct t_irc_server *server, { if (!irc_upgrading) weechat_nicklist_remove_all (ptr_buffer); + /* + * first set name property so that properties (options weechat.buffer.*) + * are applied + */ + weechat_buffer_set (ptr_buffer, "name", buffer_name); + weechat_hashtable_remove (buffer_props, "name"); /* change short_name only if it's the same or with different case */ ptr_short_name = weechat_buffer_get_string (ptr_buffer, "short_name"); if (irc_server_strcasecmp (server, ptr_short_name, channel_name) != 0) weechat_hashtable_remove (buffer_props, "short_name"); + /* apply properties */ weechat_hashtable_map (buffer_props, &irc_channel_apply_props, ptr_buffer); } else