summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/xfer/xfer-chat.c8
-rw-r--r--src/plugins/xfer/xfer-command.c2
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",