From a5f68bed016b5d4eb634a1c32fd8f6780c7f32a8 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 17 May 2012 22:38:27 +0200 Subject: [PATCH] relay: keep spaces in beginning of "input" received from client (WeeChat protocol) --- src/plugins/relay/weechat/relay-weechat-protocol.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c index abd8a924c..278719593 100644 --- a/src/plugins/relay/weechat/relay-weechat-protocol.c +++ b/src/plugins/relay/weechat/relay-weechat-protocol.c @@ -250,12 +250,17 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(nicklist) RELAY_WEECHAT_PROTOCOL_CALLBACK(input) { struct t_gui_buffer *ptr_buffer; + char *pos; RELAY_WEECHAT_PROTOCOL_MIN_ARGS(2); ptr_buffer = relay_weechat_protocol_get_buffer (argv[0]); if (ptr_buffer) - weechat_command (ptr_buffer, argv_eol[1]); + { + pos = strchr (argv_eol[0], ' '); + if (pos) + weechat_command (ptr_buffer, pos + 1); + } return WEECHAT_RC_OK; }