From e86e558f3f5a73839de7d4f4da63b15819cb266f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 15 Feb 2025 23:42:29 +0100 Subject: [PATCH] xfer: keep spaces at the end of /me command arguments --- src/plugins/xfer/xfer-command.c | 6 +++++- src/plugins/xfer/xfer-command.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/xfer/xfer-command.c b/src/plugins/xfer/xfer-command.c index 318566fd9..c92b5d448 100644 --- a/src/plugins/xfer/xfer-command.c +++ b/src/plugins/xfer/xfer-command.c @@ -27,6 +27,7 @@ #include "xfer.h" #include "xfer-buffer.h" #include "xfer-chat.h" +#include "xfer-command.h" #include "xfer-config.h" @@ -253,7 +254,9 @@ xfer_command_xfer (const void *pointer, void *data, void xfer_command_init () { - weechat_hook_command ( + struct t_hook *ptr_hook; + + ptr_hook = weechat_hook_command ( "me", N_("send a CTCP action to remote host"), /* TRANSLATORS: only text between angle brackets (eg: "") may be translated */ @@ -262,6 +265,7 @@ xfer_command_init () N_("message: message to send")), NULL, &xfer_command_me, NULL, NULL); + XFER_COMMAND_KEEP_SPACES; weechat_hook_command ( "xfer", N_("xfer control"), diff --git a/src/plugins/xfer/xfer-command.h b/src/plugins/xfer/xfer-command.h index 8995e4627..d4dc8e6f7 100644 --- a/src/plugins/xfer/xfer-command.h +++ b/src/plugins/xfer/xfer-command.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_PLUGIN_XFER_COMMAND_H #define WEECHAT_PLUGIN_XFER_COMMAND_H +#define XFER_COMMAND_KEEP_SPACES weechat_hook_set (ptr_hook, "keep_spaces_right", "1") + extern void xfer_command_init (); #endif /* WEECHAT_PLUGIN_XFER_COMMAND_H */