summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-05-17 22:38:27 +0200
committerSebastien Helleu <flashcode@flashtux.org>2012-05-17 22:38:27 +0200
commita5f68bed016b5d4eb634a1c32fd8f6780c7f32a8 (patch)
treeb745644c24600030a9ddcbe8563c3fa3e1875e8c /src
parentabb31e1d15dbcf91a2ea641d1d29fb2d191892d1 (diff)
downloadweechat-a5f68bed016b5d4eb634a1c32fd8f6780c7f32a8.zip
relay: keep spaces in beginning of "input" received from client (WeeChat protocol)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/relay/weechat/relay-weechat-protocol.c7
1 files changed, 6 insertions, 1 deletions
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;
}