1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 00:03:12 +02:00

irc: fix apply of custom buffer property "short_name" when a channel buffer is renamed

This commit is contained in:
Sébastien Helleu
2024-06-19 21:43:08 +02:00
parent 0d8e3a48ee
commit a75a947f5f
+7
View File
@@ -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