diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2016-01-23 10:37:07 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2016-01-23 10:37:07 +0100 |
commit | 1a94193147337b4c540febe258b777b635d34bc6 (patch) | |
tree | 183e6a0ea77ea957f70d8ccaf6f6957a77adfa54 | |
parent | 50817054f9a198c51056c71181529bbdaa095898 (diff) | |
download | weechat-1a94193147337b4c540febe258b777b635d34bc6.zip |
relay: fix command "input" received from clients (weechat protocol) (closes #663)
The command "input" received with only spaces in content of message was
ignored by WeeChat (because of the split on spaces).
-rw-r--r-- | ChangeLog.asciidoc | 2 | ||||
-rw-r--r-- | src/plugins/relay/weechat/relay-weechat-protocol.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index fc03b7073..51f4d5356 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -31,6 +31,8 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] keep_eol is 2 and the string ends with separators * irc: add missing completion "*" for target in command /msg * irc: fix /msg command with multiple targets including "*" +* relay: fix command "input" received from clients with only spaces in + content of message (weechat protocol) (issue #663) [[1.4]] == Version 1.4 (2016-01-10) diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c index ce47b358d..f216cb56f 100644 --- a/src/plugins/relay/weechat/relay-weechat-protocol.c +++ b/src/plugins/relay/weechat/relay-weechat-protocol.c @@ -405,7 +405,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(input) struct t_gui_buffer *ptr_buffer; char *pos, **timer_args; - RELAY_WEECHAT_PROTOCOL_MIN_ARGS(2); + RELAY_WEECHAT_PROTOCOL_MIN_ARGS(1); ptr_buffer = relay_weechat_protocol_get_buffer (argv[0]); if (!ptr_buffer) @@ -417,7 +417,7 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(input) "\"%s %s\""), RELAY_PLUGIN_NAME, command, - argv_eol[0]); + argv[0]); } return WEECHAT_RC_OK; } @@ -1351,7 +1351,7 @@ relay_weechat_protocol_recv (struct t_relay_client *client, const char *data) pos++; } argv = weechat_string_split (pos, " ", 0, 0, &argc); - argv_eol = weechat_string_split (pos, " ", 1, 0, NULL); + argv_eol = weechat_string_split (pos, " ", 2, 0, NULL); } for (i = 0; protocol_cb[i].name; i++) |