mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
xfer: fix send of data on the DCC chat buffer after /upgrade if the buffer was opened before the upgrade (issue #2092)
This commit is contained in:
+2
-1
@@ -15,8 +15,9 @@ For a list of important changes that require manual actions, please look at rele
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core, relay: fix include directory of libzstd
|
||||
* xfer: fix send of data on the DCC chat buffer after `/upgrade` if the buffer was opened before the upgrade (issue #2092)
|
||||
* irc: fix crash in split of IRC message containing a newline if the server is not given
|
||||
* core, relay: fix include directory of libzstd
|
||||
|
||||
[[v4.2.2]]
|
||||
== Version 4.2.2 (2024-04-07)
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
|
||||
extern void xfer_chat_sendf (struct t_xfer *xfer, const char *format, ...);
|
||||
extern int xfer_chat_recv_cb (const void *pointer, void *data, int fd);
|
||||
extern int xfer_chat_buffer_input_cb (const void *pointer, void *data,
|
||||
struct t_gui_buffer *buffer,
|
||||
const char *input_data);
|
||||
extern int xfer_chat_buffer_close_cb (const void *pointer, void *data,
|
||||
struct t_gui_buffer *buffer);
|
||||
extern void xfer_chat_open_buffer (struct t_xfer *xfer);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_XFER_CHAT_H */
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "xfer.h"
|
||||
#include "xfer-upgrade.h"
|
||||
#include "xfer-buffer.h"
|
||||
#include "xfer-chat.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -80,6 +81,7 @@ xfer_upgrade_set_buffer_callbacks ()
|
||||
{
|
||||
struct t_infolist *infolist;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
const char *type;
|
||||
|
||||
infolist = weechat_infolist_get ("buffer", NULL, NULL);
|
||||
if (infolist)
|
||||
@@ -89,12 +91,22 @@ xfer_upgrade_set_buffer_callbacks ()
|
||||
if (weechat_infolist_pointer (infolist, "plugin") == weechat_xfer_plugin)
|
||||
{
|
||||
ptr_buffer = weechat_infolist_pointer (infolist, "pointer");
|
||||
weechat_buffer_set_pointer (ptr_buffer, "close_callback", &xfer_buffer_close_cb);
|
||||
weechat_buffer_set_pointer (ptr_buffer, "input_callback", &xfer_buffer_input_cb);
|
||||
type = weechat_buffer_get_string (ptr_buffer, "localvar_type");
|
||||
if (strcmp (weechat_infolist_string (infolist, "name"),
|
||||
XFER_BUFFER_NAME) == 0)
|
||||
{
|
||||
xfer_buffer = ptr_buffer;
|
||||
weechat_buffer_set_pointer (
|
||||
ptr_buffer, "close_callback", &xfer_buffer_close_cb);
|
||||
weechat_buffer_set_pointer (
|
||||
ptr_buffer, "input_callback", &xfer_buffer_input_cb);
|
||||
}
|
||||
else if (type && (strcmp (type, "private") == 0))
|
||||
{
|
||||
weechat_buffer_set_pointer (
|
||||
ptr_buffer, "close_callback", &xfer_chat_buffer_close_cb);
|
||||
weechat_buffer_set_pointer (
|
||||
ptr_buffer, "input_callback", &xfer_chat_buffer_input_cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user