summaryrefslogtreecommitdiff
path: root/src/plugins/relay/irc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-03-10 13:16:59 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-03-10 18:29:16 +0100
commit2b70d71aa1c891f2f251aa775cf239e5611576d5 (patch)
tree33b7daaa910582482c420e4e1e06a2d8851572e9 /src/plugins/relay/irc
parent8aa5f5375e2a16d538fdf96babcd52a2f8f7801c (diff)
downloadweechat-2b70d71aa1c891f2f251aa775cf239e5611576d5.zip
core: replace argument "keep_eol" by "flags" in function string_split (closes #1322)
Diffstat (limited to 'src/plugins/relay/irc')
-rw-r--r--src/plugins/relay/irc/relay-irc.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c
index bb97ca293..506afb020 100644
--- a/src/plugins/relay/irc/relay-irc.c
+++ b/src/plugins/relay/irc/relay-irc.c
@@ -337,7 +337,11 @@ relay_irc_tag_relay_client_id (const char *tags)
if (tags && tags[0])
{
- argv = weechat_string_split (tags, ",", 0, 0, &argc);
+ argv = weechat_string_split (tags, ",",
+ WEECHAT_STRING_SPLIT_STRIP_LEFT
+ | WEECHAT_STRING_SPLIT_STRIP_RIGHT
+ | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
+ 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
@@ -561,7 +565,11 @@ relay_irc_hsignal_irc_redir_cb (const void *pointer, void *data,
if (!output)
return WEECHAT_RC_OK;
- messages = weechat_string_split (output, "\n", 0, 0, &num_messages);
+ messages = weechat_string_split (output, "\n",
+ WEECHAT_STRING_SPLIT_STRIP_LEFT
+ | WEECHAT_STRING_SPLIT_STRIP_RIGHT
+ | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
+ 0, &num_messages);
if (messages)
{
for (i = 0; i < num_messages; i++)
@@ -1347,8 +1355,23 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
irc_args = weechat_hashtable_get (hash_parsed, "arguments");
if (irc_args)
{
- irc_argv = weechat_string_split (irc_args, " ", 0, 0, &irc_argc);
- irc_argv_eol = weechat_string_split (irc_args, " ", 1, 0, NULL);
+ irc_argv = weechat_string_split (
+ irc_args,
+ " ",
+ WEECHAT_STRING_SPLIT_STRIP_LEFT
+ | WEECHAT_STRING_SPLIT_STRIP_RIGHT
+ | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
+ 0,
+ &irc_argc);
+ irc_argv_eol = weechat_string_split (
+ irc_args,
+ " ",
+ WEECHAT_STRING_SPLIT_STRIP_LEFT
+ | WEECHAT_STRING_SPLIT_STRIP_RIGHT
+ | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
+ | WEECHAT_STRING_SPLIT_KEEP_EOL,
+ 0,
+ NULL);
}
/*