diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-06-06 09:57:05 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-06-06 09:57:05 +0200 |
commit | dff39136a3d7cb82ab087a121520be797d31ac55 (patch) | |
tree | 3b911ea5b4295180e0b3a76db146aabdb22af947 | |
parent | 7c6c450662ec81b23a585e2abb9311f024138cb8 (diff) | |
parent | 8d1d2c0321e9773e2a361e311f1a209f96120ffd (diff) | |
download | weechat-dff39136a3d7cb82ab087a121520be797d31ac55.zip |
Merge remote-tracking branch 'origin/pr/426'
-rw-r--r-- | src/plugins/xfer/xfer-chat.c | 8 | ||||
-rw-r--r-- | src/plugins/xfer/xfer-command.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/xfer/xfer-chat.c b/src/plugins/xfer/xfer-chat.c index 058f00ecf..94af315b1 100644 --- a/src/plugins/xfer/xfer-chat.c +++ b/src/plugins/xfer/xfer-chat.c @@ -160,6 +160,12 @@ xfer_chat_recv_cb (void *arg_xfer, int fd) { ctcp_action = 0; length = strlen (ptr_buf); + if (ptr_buf[length - 1] == '\r') + { + ptr_buf[length - 1] = '\0'; + length--; + } + if ((ptr_buf[0] == '\01') && (ptr_buf[length - 1] == '\01')) { @@ -268,7 +274,7 @@ xfer_chat_buffer_input_cb (void *data, struct t_gui_buffer *buffer, { if (!XFER_HAS_ENDED(ptr_xfer->status)) { - xfer_chat_sendf (ptr_xfer, "%s\n", input_data); + xfer_chat_sendf (ptr_xfer, "%s\r\n", input_data); if (!XFER_HAS_ENDED(ptr_xfer->status)) { str_color = xfer_chat_color_for_tags (weechat_config_color (weechat_config_get ("weechat.color.chat_nick_self"))); diff --git a/src/plugins/xfer/xfer-command.c b/src/plugins/xfer/xfer-command.c index 728440b22..ff5f18f01 100644 --- a/src/plugins/xfer/xfer-command.c +++ b/src/plugins/xfer/xfer-command.c @@ -58,7 +58,7 @@ xfer_command_me (void *data, struct t_gui_buffer *buffer, int argc, if (!XFER_HAS_ENDED(ptr_xfer->status)) { - xfer_chat_sendf (ptr_xfer, "\01ACTION %s\01\n", + xfer_chat_sendf (ptr_xfer, "\01ACTION %s\01\r\n", (argv_eol[1]) ? argv_eol[1] : ""); weechat_printf_tags (buffer, "no_highlight", |