diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 0745d762f..30b9bbb76 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -44,6 +44,7 @@ Bug fixes:: * core: fix resize of a bar when its size is 0 (automatic) (issue #1470) * exec: fix use of same task id for different tasks (issue #1491) * fifo: fix errors when writing in the FIFO pipe (issue #713) + * irc: reuse a buffer with wrong type "channel" when a private message is received (issue #869) * python: fix crash when invalid UTF-8 string is in a WeeChat hashtable converted to a Python dict (issue #1463) * relay: fix slow send of data to clients when SSL is enabled * trigger: fix truncated trigger command with commands /trigger input|output|recreate diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 0bf18216d..8b8fa60db 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -247,6 +247,18 @@ irc_channel_create_buffer (struct t_irc_server *server, ptr_buffer = irc_channel_search_buffer (server, channel_type, channel_name); + if (!ptr_buffer && (channel_type == IRC_CHANNEL_TYPE_PRIVATE)) + { + /* + * in case of private buffer, we reuse a buffer which has wrong type + * "channel" (opened by a manual /join or autojoin) + */ + ptr_buffer = irc_channel_search_buffer (server, + IRC_CHANNEL_TYPE_CHANNEL, + channel_name); + if (ptr_buffer) + weechat_bar_item_update ("buffer_name"); + } if (ptr_buffer) { weechat_nicklist_remove_all (ptr_buffer);