summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/alias/alias-completion.c2
-rw-r--r--src/plugins/alias/alias.c2
-rw-r--r--src/plugins/buflist/buflist-config.c3
-rw-r--r--src/plugins/buflist/buflist-mouse.c2
-rw-r--r--src/plugins/exec/exec-buffer.c4
-rw-r--r--src/plugins/exec/exec-config.c1
-rw-r--r--src/plugins/fset/fset-buffer.c2
-rw-r--r--src/plugins/fset/fset-command.c2
-rw-r--r--src/plugins/fset/fset-completion.c1
-rw-r--r--src/plugins/fset/fset-config.c1
-rw-r--r--src/plugins/irc/irc-color.c2
-rw-r--r--src/plugins/irc/irc-command.c20
-rw-r--r--src/plugins/irc/irc-config.c12
-rw-r--r--src/plugins/irc/irc-info.c8
-rw-r--r--src/plugins/irc/irc-input.c1
-rw-r--r--src/plugins/irc/irc-message.c10
-rw-r--r--src/plugins/irc/irc-mode.c6
-rw-r--r--src/plugins/irc/irc-notify.c7
-rw-r--r--src/plugins/irc/irc-protocol.c16
-rw-r--r--src/plugins/irc/irc-redirect.c9
-rw-r--r--src/plugins/irc/irc-server.c9
-rw-r--r--src/plugins/irc/irc-upgrade.c2
-rw-r--r--src/plugins/plugin-api-info.c4
-rw-r--r--src/plugins/plugin-script-api.c2
-rw-r--r--src/plugins/plugin-script.c6
-rw-r--r--src/plugins/plugin.c1
-rw-r--r--src/plugins/python/weechat-python.c2
-rw-r--r--src/plugins/relay/irc/relay-irc.c6
-rw-r--r--src/plugins/relay/relay-client.c2
-rw-r--r--src/plugins/relay/relay-config.c3
-rw-r--r--src/plugins/relay/relay-info.c2
-rw-r--r--src/plugins/relay/weechat/relay-weechat-msg.c5
-rw-r--r--src/plugins/relay/weechat/relay-weechat-protocol.c22
-rw-r--r--src/plugins/script/script-action.c8
-rw-r--r--src/plugins/script/script-completion.c1
-rw-r--r--src/plugins/script/script-config.c4
-rw-r--r--src/plugins/script/script-repo.c9
-rw-r--r--src/plugins/spell/spell-bar-item.c3
-rw-r--r--src/plugins/spell/spell-config.c1
-rw-r--r--src/plugins/spell/spell-speller.c6
-rw-r--r--src/plugins/trigger/trigger-buffer.c1
-rw-r--r--src/plugins/trigger/trigger-callback.c8
-rw-r--r--src/plugins/trigger/trigger-command.c7
-rw-r--r--src/plugins/trigger/trigger-completion.c5
-rw-r--r--src/plugins/trigger/trigger.c2
-rw-r--r--src/plugins/weechat-plugin.h12
-rw-r--r--src/plugins/xfer/xfer.c1
47 files changed, 155 insertions, 90 deletions
diff --git a/src/plugins/alias/alias-completion.c b/src/plugins/alias/alias-completion.c
index 9c4caf3eb..baa041f24 100644
--- a/src/plugins/alias/alias-completion.c
+++ b/src/plugins/alias/alias-completion.c
@@ -79,7 +79,7 @@ alias_completion_alias_value_cb (const void *pointer, void *data,
args = weechat_hook_completion_get_string (completion, "args");
if (args)
{
- argv = weechat_string_split (args, " ",
+ argv = weechat_string_split (args, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c
index bf5c97969..24c916a2c 100644
--- a/src/plugins/alias/alias.c
+++ b/src/plugins/alias/alias.c
@@ -190,7 +190,7 @@ alias_replace_args (const char *alias_args, const char *user_args)
const char *start, *pos;
int n, m, argc, length_res, args_count, offset;
- argv = weechat_string_split (user_args, " ",
+ argv = weechat_string_split (user_args, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c
index 2072211d3..148b0fbd6 100644
--- a/src/plugins/buflist/buflist-config.c
+++ b/src/plugins/buflist/buflist-config.c
@@ -165,7 +165,7 @@ buflist_config_hook_signals_refresh ()
BUFLIST_CONFIG_SIGNALS_REFRESH_NICK_PREFIX);
}
- signals = weechat_string_split (*all_signals, ",",
+ signals = weechat_string_split (*all_signals, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -257,6 +257,7 @@ buflist_config_change_sort (const void *pointer, void *data,
buflist_config_sort_fields = weechat_string_split (
weechat_config_string (buflist_config_look_sort),
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/buflist/buflist-mouse.c b/src/plugins/buflist/buflist-mouse.c
index b5aa0e685..7afd2e465 100644
--- a/src/plugins/buflist/buflist-mouse.c
+++ b/src/plugins/buflist/buflist-mouse.c
@@ -87,7 +87,7 @@ buflist_focus_cb (const void *pointer, void *data, struct t_hashtable *info)
end:
/* get list of keys */
keys = weechat_hdata_get_string (buflist_hdata_buffer, "var_keys");
- list_keys = weechat_string_split (keys, ",",
+ list_keys = weechat_string_split (keys, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/exec/exec-buffer.c b/src/plugins/exec/exec-buffer.c
index 230f46592..4c1af8794 100644
--- a/src/plugins/exec/exec-buffer.c
+++ b/src/plugins/exec/exec-buffer.c
@@ -53,12 +53,12 @@ exec_buffer_input_cb (const void *pointer, void *data,
return WEECHAT_RC_OK;
}
- argv = weechat_string_split (input_data, " ",
+ argv = weechat_string_split (input_data, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &argc);
- argv_eol = weechat_string_split (input_data, " ",
+ argv_eol = weechat_string_split (input_data, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
diff --git a/src/plugins/exec/exec-config.c b/src/plugins/exec/exec-config.c
index c8fb0ea97..227155af1 100644
--- a/src/plugins/exec/exec-config.c
+++ b/src/plugins/exec/exec-config.c
@@ -64,6 +64,7 @@ exec_config_change_command_default_options (const void *pointer, void *data,
exec_config_cmd_options = weechat_string_split (
weechat_config_string (exec_config_command_default_options),
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/fset/fset-buffer.c b/src/plugins/fset/fset-buffer.c
index 6820148ca..a3230eabe 100644
--- a/src/plugins/fset/fset-buffer.c
+++ b/src/plugins/fset/fset-buffer.c
@@ -782,7 +782,7 @@ fset_buffer_display_option_eval (struct t_fset_option *fset_option)
NULL);
if (line)
{
- lines = weechat_string_split (line, "\r\n",
+ lines = weechat_string_split (line, "\r\n", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c
index 4b510a8a7..776664f76 100644
--- a/src/plugins/fset/fset-command.c
+++ b/src/plugins/fset/fset-command.c
@@ -469,7 +469,7 @@ fset_command_run_set_cb (const void *pointer, void *data,
rc = WEECHAT_RC_OK;
- argv = weechat_string_split (command, " ",
+ argv = weechat_string_split (command, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/fset/fset-completion.c b/src/plugins/fset/fset-completion.c
index 25b2eb6ec..2be16484b 100644
--- a/src/plugins/fset/fset-completion.c
+++ b/src/plugins/fset/fset-completion.c
@@ -82,6 +82,7 @@ fset_completion_option_cb (const void *pointer, void *data,
words = weechat_string_split (
weechat_config_option_get_string (ptr_option, "name"),
"_",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/fset/fset-config.c b/src/plugins/fset/fset-config.c
index 3a4b1bb18..66e8f16b9 100644
--- a/src/plugins/fset/fset-config.c
+++ b/src/plugins/fset/fset-config.c
@@ -154,6 +154,7 @@ fset_config_change_sort_cb (const void *pointer, void *data,
fset_config_sort_fields = weechat_string_split (
weechat_config_string (fset_config_look_sort),
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-color.c b/src/plugins/irc/irc-color.c
index 366ebe40b..6def56b72 100644
--- a/src/plugins/irc/irc-color.c
+++ b/src/plugins/irc/irc-color.c
@@ -511,7 +511,7 @@ irc_color_decode_ansi_cb (void *data, const char *text)
if (!text2)
goto end;
- items = weechat_string_split (text2, ";",
+ items = weechat_string_split (text2, ";", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 41a10a278..531196138 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -419,7 +419,7 @@ irc_command_exec_all_channels (struct t_irc_server *server,
return;
channels = (str_channels && str_channels[0]) ?
- weechat_string_split (str_channels, ",",
+ weechat_string_split (str_channels, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -678,7 +678,7 @@ irc_command_exec_all_servers (int inclusive, const char *str_servers, const char
return;
servers = (str_servers && str_servers[0]) ?
- weechat_string_split (str_servers, ",",
+ weechat_string_split (str_servers, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1108,12 +1108,12 @@ irc_command_run_away (const void *pointer, void *data,
int argc;
char **argv, **argv_eol;
- argv = weechat_string_split (command, " ",
+ argv = weechat_string_split (command, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &argc);
- argv_eol = weechat_string_split (command, " ",
+ argv_eol = weechat_string_split (command, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
@@ -1586,7 +1586,7 @@ IRC_COMMAND_CALLBACK(ctcp)
IRC_COMMAND_CHECK_SERVER("ctcp", 1);
- targets = weechat_string_split (argv[arg_target], ",",
+ targets = weechat_string_split (argv[arg_target], ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1696,7 +1696,7 @@ IRC_COMMAND_CALLBACK(cycle)
{
channel_name = argv[1];
pos_args = argv_eol[2];
- channels = weechat_string_split (channel_name, ",",
+ channels = weechat_string_split (channel_name, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -2548,7 +2548,7 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments,
pos_keys++;
}
if (pos_keys[0])
- keys = weechat_string_split (pos_keys, ",",
+ keys = weechat_string_split (pos_keys, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -2559,7 +2559,7 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments,
if (new_args)
{
- channels = weechat_string_split (new_args, ",",
+ channels = weechat_string_split (new_args, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -3311,7 +3311,7 @@ IRC_COMMAND_CALLBACK(msg)
IRC_COMMAND_CHECK_SERVER("msg", 1);
- targets = weechat_string_split (argv[arg_target], ",",
+ targets = weechat_string_split (argv[arg_target], ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -4110,7 +4110,7 @@ IRC_COMMAND_CALLBACK(query)
IRC_COMMAND_CHECK_SERVER("query", 1);
- nicks = weechat_string_split (argv[arg_nick], ",",
+ nicks = weechat_string_split (argv[arg_nick], ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index f133eb37f..119d2b3c5 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -360,6 +360,7 @@ irc_config_change_look_display_join_message (const void *pointer, void *data,
items = weechat_string_split (
weechat_config_string (irc_config_look_display_join_message),
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -589,6 +590,7 @@ irc_config_change_look_nicks_hide_password (const void *pointer, void *data,
irc_config_nicks_hide_password = weechat_string_split (
nicks_hide_password,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -721,6 +723,7 @@ irc_config_change_color_mirc_remap (const void *pointer, void *data,
items = weechat_string_split (
weechat_config_string (irc_config_color_mirc_remap),
";",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -773,6 +776,7 @@ irc_config_change_color_nick_prefixes (const void *pointer, void *data,
items = weechat_string_split (
weechat_config_string (irc_config_color_nick_prefixes),
";",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1043,7 +1047,7 @@ irc_config_check_autojoin (const char *autojoin)
if (strstr (string, ", ") || strstr (string, " ,"))
goto end;
- items = weechat_string_split (string, " ",
+ items = weechat_string_split (string, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1051,14 +1055,14 @@ irc_config_check_autojoin (const char *autojoin)
if (!items || (num_items < 1) || (num_items > 2))
goto end;
- channels = weechat_string_split (items[0], ",",
+ channels = weechat_string_split (items[0], ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &num_channels);
if (num_items == 2)
- keys = weechat_string_split (items[1], ",",
+ keys = weechat_string_split (items[1], ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1512,6 +1516,7 @@ irc_config_ignore_read_cb (const void *pointer, void *data,
argv = weechat_string_split (
value,
";",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1520,6 +1525,7 @@ irc_config_ignore_read_cb (const void *pointer, void *data,
argv_eol = weechat_string_split (
value,
";",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c
index d63b700f3..51eed3b61 100644
--- a/src/plugins/irc/irc-info.c
+++ b/src/plugins/irc/irc-info.c
@@ -526,7 +526,7 @@ irc_info_infolist_irc_channel_cb (const void *pointer, void *data,
ptr_server = NULL;
ptr_channel = NULL;
- argv = weechat_string_split (arguments, ",",
+ argv = weechat_string_split (arguments, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -618,7 +618,7 @@ irc_info_infolist_irc_modelist_cb (const void *pointer, void *data,
ptr_server = NULL;
ptr_channel = NULL;
- argv = weechat_string_split (arguments, ",",
+ argv = weechat_string_split (arguments, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -719,7 +719,7 @@ irc_info_infolist_irc_modelist_item_cb (const void *pointer, void *data,
ptr_server = NULL;
ptr_channel = NULL;
- argv = weechat_string_split (arguments, ",",
+ argv = weechat_string_split (arguments, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -831,7 +831,7 @@ irc_info_infolist_irc_nick_cb (const void *pointer, void *data,
ptr_server = NULL;
ptr_channel = NULL;
- argv = weechat_string_split (arguments, ",",
+ argv = weechat_string_split (arguments, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-input.c b/src/plugins/irc/irc-input.c
index 6e833c963..53dedba4a 100644
--- a/src/plugins/irc/irc-input.c
+++ b/src/plugins/irc/irc-input.c
@@ -364,6 +364,7 @@ irc_input_send_cb (const void *pointer, void *data,
list_options = weechat_string_split (
options,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c
index 45d6052ab..8899bee53 100644
--- a/src/plugins/irc/irc-message.c
+++ b/src/plugins/irc/irc-message.c
@@ -779,7 +779,7 @@ irc_message_split_join (struct t_hashtable *hashtable,
str = weechat_strndup (arguments, pos - arguments);
if (!str)
return 0;
- channels = weechat_string_split (str, ",",
+ channels = weechat_string_split (str, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -790,7 +790,7 @@ irc_message_split_join (struct t_hashtable *hashtable,
pos++;
}
if (pos[0])
- keys = weechat_string_split (pos, ",",
+ keys = weechat_string_split (pos, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -798,7 +798,7 @@ irc_message_split_join (struct t_hashtable *hashtable,
}
else
{
- channels = weechat_string_split (arguments, ",",
+ channels = weechat_string_split (arguments, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1054,12 +1054,12 @@ irc_message_split (struct t_irc_server *server, const char *message)
}
}
- argv = weechat_string_split (message, " ",
+ argv = weechat_string_split (message, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &argc);
- argv_eol = weechat_string_split (message, " ",
+ argv_eol = weechat_string_split (message, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
| WEECHAT_STRING_SPLIT_KEEP_EOL,
diff --git a/src/plugins/irc/irc-mode.c b/src/plugins/irc/irc-mode.c
index 3648cffc5..d6c749168 100644
--- a/src/plugins/irc/irc-mode.c
+++ b/src/plugins/irc/irc-mode.c
@@ -47,7 +47,7 @@ irc_mode_get_arguments (const char *arguments)
if (!arguments || !arguments[0])
return strdup ("");
- argv = weechat_string_split (arguments, " ",
+ argv = weechat_string_split (arguments, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -173,7 +173,7 @@ irc_mode_channel_update (struct t_irc_server *server,
pos_args++;
while (pos_args[0] == ' ')
pos_args++;
- argv = weechat_string_split (pos_args, " ",
+ argv = weechat_string_split (pos_args, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -386,7 +386,7 @@ irc_mode_channel_set (struct t_irc_server *server,
argv = NULL;
if (modes_arguments)
{
- argv = weechat_string_split (modes_arguments, " ",
+ argv = weechat_string_split (modes_arguments, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-notify.c b/src/plugins/irc/irc-notify.c
index cdbbe722f..3c913063d 100644
--- a/src/plugins/irc/irc-notify.c
+++ b/src/plugins/irc/irc-notify.c
@@ -373,7 +373,7 @@ irc_notify_new_for_server (struct t_irc_server *server)
if (!notify || !notify[0])
return;
- items = weechat_string_split (notify, ",",
+ items = weechat_string_split (notify, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -395,6 +395,7 @@ irc_notify_new_for_server (struct t_irc_server *server)
params = weechat_string_split (
pos_params,
"/",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -840,6 +841,7 @@ irc_notify_hsignal_cb (const void *pointer, void *data, const char *signal,
messages = weechat_string_split (
output,
"\n",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -850,6 +852,7 @@ irc_notify_hsignal_cb (const void *pointer, void *data, const char *signal,
nicks_sent = weechat_string_split (
ptr_args,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -883,6 +886,7 @@ irc_notify_hsignal_cb (const void *pointer, void *data, const char *signal,
nicks_recv = weechat_string_split (
pos,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -952,6 +956,7 @@ irc_notify_hsignal_cb (const void *pointer, void *data, const char *signal,
messages = weechat_string_split (
output,
"\n",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 8a8aae461..c1790e649 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -398,6 +398,7 @@ irc_protocol_cap_sync (struct t_irc_server *server, int sasl)
caps_requested = weechat_string_split (
cap_option,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -515,6 +516,7 @@ IRC_PROTOCOL_CALLBACK(cap)
caps_supported = weechat_string_split (
ptr_caps,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -597,6 +599,7 @@ IRC_PROTOCOL_CALLBACK(cap)
caps_enabled = weechat_string_split (
ptr_caps,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -658,6 +661,7 @@ IRC_PROTOCOL_CALLBACK(cap)
caps_supported = weechat_string_split (
ptr_caps,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -770,6 +774,7 @@ IRC_PROTOCOL_CALLBACK(cap)
caps_added = weechat_string_split (
ptr_caps,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -816,6 +821,7 @@ IRC_PROTOCOL_CALLBACK(cap)
caps_removed = weechat_string_split (
ptr_caps,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -5891,6 +5897,7 @@ IRC_PROTOCOL_CALLBACK(730)
nicks = weechat_string_split ((argv_eol[3][0] == ':') ?
argv_eol[3] + 1 : argv_eol[3],
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -5934,6 +5941,7 @@ IRC_PROTOCOL_CALLBACK(731)
nicks = weechat_string_split ((argv_eol[3][0] == ':') ?
argv_eol[3] + 1 : argv_eol[3],
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -6178,7 +6186,7 @@ irc_protocol_get_message_tags (const char *tags)
if (!hashtable)
return NULL;
- items = weechat_string_split (tags, ";",
+ items = weechat_string_split (tags, ";", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -6596,7 +6604,7 @@ irc_protocol_recv_command (struct t_irc_server *server,
}
else
message_colors_decoded = NULL;
- argv = weechat_string_split (message_colors_decoded, " ",
+ argv = weechat_string_split (message_colors_decoded, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -6606,8 +6614,8 @@ irc_protocol_recv_command (struct t_irc_server *server,
| WEECHAT_STRING_SPLIT_KEEP_EOL;
if (keep_trailing_spaces)
flags |= WEECHAT_STRING_SPLIT_STRIP_RIGHT;
- argv_eol = weechat_string_split (message_colors_decoded, " ", flags,
- 0, NULL);
+ argv_eol = weechat_string_split (message_colors_decoded, " ", NULL,
+ flags, 0, NULL);
return_code = (int) (cmd_recv_func) (server,
date, nick, address_color,
diff --git a/src/plugins/irc/irc-redirect.c b/src/plugins/irc/irc-redirect.c
index 8ace5a4c0..a1081ea3f 100644
--- a/src/plugins/irc/irc-redirect.c
+++ b/src/plugins/irc/irc-redirect.c
@@ -422,25 +422,25 @@ irc_redirect_new_with_commands (struct t_irc_server *server,
items[i] = NULL;
}
if (cmd_start)
- items[0] = weechat_string_split (cmd_start, ",",
+ items[0] = weechat_string_split (cmd_start, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &num_items[0]);
if (cmd_stop)
- items[1] = weechat_string_split (cmd_stop, ",",
+ items[1] = weechat_string_split (cmd_stop, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &num_items[1]);
if (cmd_extra)
- items[2] = weechat_string_split (cmd_extra, ",",
+ items[2] = weechat_string_split (cmd_extra, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &num_items[2]);
if (cmd_filter)
- items[3] = weechat_string_split (cmd_filter, ",",
+ items[3] = weechat_string_split (cmd_filter, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -812,6 +812,7 @@ irc_redirect_message (struct t_irc_server *server, const char *message,
arguments_argv = weechat_string_split (
arguments,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 03fd58093..a2bec8b39 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -425,7 +425,7 @@ irc_server_eval_fingerprint (struct t_irc_server *server)
}
/* split fingerprint */
- fingerprints = weechat_string_split (fingerprint_eval, ",",
+ fingerprints = weechat_string_split (fingerprint_eval, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -616,6 +616,7 @@ irc_server_set_addresses (struct t_irc_server *server, const char *addresses)
server->addresses_array = weechat_string_split (
addresses_eval,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -716,6 +717,7 @@ irc_server_set_nicks (struct t_irc_server *server, const char *nicks)
server->nicks_array = weechat_string_split (
(nicks2) ? nicks2 : IRC_SERVER_DEFAULT_NICKS,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -2683,7 +2685,7 @@ irc_server_sendf (struct t_irc_server *server, int flags, const char *tags,
}
rc = 1;
- items = weechat_string_split (vbuffer, "\n",
+ items = weechat_string_split (vbuffer, "\n", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -4284,7 +4286,7 @@ irc_server_check_certificate_fingerprint (struct t_irc_server *server,
}
/* split good_fingerprints */
- fingerprints = weechat_string_split (good_fingerprints, ",",
+ fingerprints = weechat_string_split (good_fingerprints, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -5210,6 +5212,7 @@ irc_server_autojoin_create_buffers (struct t_irc_server *server)
channels = weechat_string_split (
autojoin2,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/irc/irc-upgrade.c b/src/plugins/irc/irc-upgrade.c
index 4276d84fe..0d2ca9883 100644
--- a/src/plugins/irc/irc-upgrade.c
+++ b/src/plugins/irc/irc-upgrade.c
@@ -555,6 +555,7 @@ irc_upgrade_read_cb (const void *pointer, void *data,
items = weechat_string_split (
str,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -617,6 +618,7 @@ irc_upgrade_read_cb (const void *pointer, void *data,
nicks = weechat_string_split (
str,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/plugin-api-info.c b/src/plugins/plugin-api-info.c
index f92d0afa9..dfab31033 100644
--- a/src/plugins/plugin-api-info.c
+++ b/src/plugins/plugin-api-info.c
@@ -684,7 +684,7 @@ plugin_api_info_totp_generate_cb (const void *pointer, void *data,
if (!arguments || !arguments[0])
goto error;
- argv = string_split (arguments, ",",
+ argv = string_split (arguments, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -756,7 +756,7 @@ plugin_api_info_totp_validate_cb (const void *pointer, void *data,
if (!arguments || !arguments[0])
goto error;
- argv = string_split (arguments, ",",
+ argv = string_split (arguments, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/plugin-script-api.c b/src/plugins/plugin-script-api.c
index d07ac85ff..faf3280e4 100644
--- a/src/plugins/plugin-script-api.c
+++ b/src/plugins/plugin-script-api.c
@@ -64,7 +64,7 @@ plugin_script_api_string_match_list (struct t_weechat_plugin *weechat_plugin,
int match;
list_masks = (masks && masks[0]) ?
- weechat_string_split (masks, ",",
+ weechat_string_split (masks, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/plugin-script.c b/src/plugins/plugin-script.c
index 8dff7acca..c07a43b83 100644
--- a/src/plugins/plugin-script.c
+++ b/src/plugins/plugin-script.c
@@ -1251,7 +1251,7 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin,
}
}
- argv = weechat_string_split (ptr_list, ",",
+ argv = weechat_string_split (ptr_list, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1400,7 +1400,7 @@ plugin_script_action_remove (struct t_weechat_plugin *weechat_plugin,
ptr_list += 3;
}
- argv = weechat_string_split (ptr_list, ",",
+ argv = weechat_string_split (ptr_list, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1474,7 +1474,7 @@ plugin_script_action_autoload (struct t_weechat_plugin *weechat_plugin,
}
}
- argv = weechat_string_split (ptr_list, ",",
+ argv = weechat_string_split (ptr_list, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index dadfdd2a3..de669e8fd 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -1007,6 +1007,7 @@ plugin_auto_load (char *force_plugin_autoload,
plugin_autoload_array = string_split (
ptr_plugin_autoload,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index f36899dce..34ad5f15b 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -155,7 +155,7 @@ weechat_python_get_python2_bin ()
if (dir_separator && path)
{
- paths = weechat_string_split (path, ":",
+ paths = weechat_string_split (path, ":", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c
index e54e52403..632fbabb6 100644
--- a/src/plugins/relay/irc/relay-irc.c
+++ b/src/plugins/relay/irc/relay-irc.c
@@ -337,7 +337,7 @@ relay_irc_tag_relay_client_id (const char *tags)
if (tags && tags[0])
{
- argv = weechat_string_split (tags, ",",
+ argv = weechat_string_split (tags, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -565,7 +565,7 @@ relay_irc_hsignal_irc_redir_cb (const void *pointer, void *data,
if (!output)
return WEECHAT_RC_OK;
- messages = weechat_string_split (output, "\n",
+ messages = weechat_string_split (output, "\n", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1359,6 +1359,7 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
irc_argv = weechat_string_split (
irc_args,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1367,6 +1368,7 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
irc_argv_eol = weechat_string_split (
irc_args,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
diff --git a/src/plugins/relay/relay-client.c b/src/plugins/relay/relay-client.c
index 8ecc8777e..2d8272a8b 100644
--- a/src/plugins/relay/relay-client.c
+++ b/src/plugins/relay/relay-client.c
@@ -339,7 +339,7 @@ relay_client_recv_text (struct t_relay_client *client, const char *data)
pos[0] = '\0';
- lines = weechat_string_split (client->partial_message, "\n",
+ lines = weechat_string_split (client->partial_message, "\n", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c
index 7aeabd136..6cd92344e 100644
--- a/src/plugins/relay/relay-config.c
+++ b/src/plugins/relay/relay-config.c
@@ -411,7 +411,7 @@ relay_config_check_irc_backlog_tags (const void *pointer, void *data,
return rc;
/* split tags and check them */
- tags = weechat_string_split (value, ",",
+ tags = weechat_string_split (value, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -462,6 +462,7 @@ relay_config_change_irc_backlog_tags (const void *pointer, void *data,
items = weechat_string_split (
weechat_config_string (relay_config_irc_backlog_tags),
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/relay/relay-info.c b/src/plugins/relay/relay-info.c
index 3b33d88c1..b2227e131 100644
--- a/src/plugins/relay/relay-info.c
+++ b/src/plugins/relay/relay-info.c
@@ -53,7 +53,7 @@ relay_info_info_relay_client_count_cb (const void *pointer, void *data,
protocol = -1;
status = -1;
- items = weechat_string_split (arguments, ",",
+ items = weechat_string_split (arguments, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/relay/weechat/relay-weechat-msg.c b/src/plugins/relay/weechat/relay-weechat-msg.c
index 42ce0a561..10e6e0fa8 100644
--- a/src/plugins/relay/weechat/relay-weechat-msg.c
+++ b/src/plugins/relay/weechat/relay-weechat-msg.c
@@ -583,7 +583,7 @@ relay_weechat_msg_add_hdata (struct t_relay_weechat_msg *msg,
goto end;
/* split path */
- list_path = weechat_string_split (pos + 1, "/",
+ list_path = weechat_string_split (pos + 1, "/", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -653,7 +653,7 @@ relay_weechat_msg_add_hdata (struct t_relay_weechat_msg *msg,
/* split keys */
if (!keys)
keys = weechat_hdata_get_string (ptr_hdata, "var_keys");
- list_keys = weechat_string_split (keys, ",",
+ list_keys = weechat_string_split (keys, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -793,6 +793,7 @@ relay_weechat_msg_add_infolist (struct t_relay_weechat_msg *msg,
list_fields = weechat_string_split (
fields,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c
index d007d6396..8d50c5d17 100644
--- a/src/plugins/relay/weechat/relay-weechat-protocol.c
+++ b/src/plugins/relay/weechat/relay-weechat-protocol.c
@@ -1030,18 +1030,21 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(sync)
RELAY_WEECHAT_PROTOCOL_MIN_ARGS(0);
- buffers = weechat_string_split ((argc > 0) ? argv[0] : "*", ",",
+ buffers = weechat_string_split ((argc > 0) ? argv[0] : "*",
+ ",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
- 0, &num_buffers);
+ 0,
+ &num_buffers);
if (buffers)
{
add_flags = RELAY_WEECHAT_PROTOCOL_SYNC_ALL;
if (argc > 1)
{
add_flags = 0;
- flags = weechat_string_split (argv[1], ",",
+ flags = weechat_string_split (argv[1], ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1116,18 +1119,21 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(desync)
RELAY_WEECHAT_PROTOCOL_MIN_ARGS(0);
- buffers = weechat_string_split ((argc > 0) ? argv[0] : "*", ",",
+ buffers = weechat_string_split ((argc > 0) ? argv[0] : "*",
+ ",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
- 0, &num_buffers);
+ 0,
+ &num_buffers);
if (buffers)
{
sub_flags = RELAY_WEECHAT_PROTOCOL_SYNC_ALL;
if (argc > 1)
{
sub_flags = 0;
- flags = weechat_string_split (argv[1], ",",
+ flags = weechat_string_split (argv[1], ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1402,12 +1408,12 @@ relay_weechat_protocol_recv (struct t_relay_client *client, const char *data)
{
pos++;
}
- argv = weechat_string_split (pos, " ",
+ argv = weechat_string_split (pos, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &argc);
- argv_eol = weechat_string_split (pos, " ",
+ argv_eol = weechat_string_split (pos, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
| WEECHAT_STRING_SPLIT_KEEP_EOL,
diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c
index c97e58b58..14d313d30 100644
--- a/src/plugins/script/script-action.c
+++ b/src/plugins/script/script-action.c
@@ -832,7 +832,7 @@ script_action_show_diff_process_cb (const void *pointer, void *data,
{
if (out)
{
- lines = weechat_string_split (out, "\n",
+ lines = weechat_string_split (out, "\n", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -871,7 +871,7 @@ script_action_show_diff_process_cb (const void *pointer, void *data,
}
else if (err)
{
- lines = weechat_string_split (err, "\n",
+ lines = weechat_string_split (err, "\n", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1181,7 +1181,7 @@ script_action_run ()
script_get_loaded_plugins ();
- actions = weechat_string_split (script_actions, "\n",
+ actions = weechat_string_split (script_actions, "\n", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1217,6 +1217,7 @@ script_action_run ()
argv = weechat_string_split (
ptr_action,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1225,6 +1226,7 @@ script_action_run ()
argv_eol = weechat_string_split (
ptr_action,
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
diff --git a/src/plugins/script/script-completion.c b/src/plugins/script/script-completion.c
index 7878d7f80..9526c435d 100644
--- a/src/plugins/script/script-completion.c
+++ b/src/plugins/script/script-completion.c
@@ -261,6 +261,7 @@ script_completion_tags_cb (const void *pointer, void *data,
list_tags = weechat_string_split (
ptr_script->tags,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c
index 2006500f5..88c04a169 100644
--- a/src/plugins/script/script-config.c
+++ b/src/plugins/script/script-config.c
@@ -114,7 +114,7 @@ script_config_get_diff_command ()
result[0] = '\0';
if (dir_separator && path)
{
- paths = weechat_string_split (path, ":",
+ paths = weechat_string_split (path, ":", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -299,6 +299,7 @@ script_config_hold (const char *name_with_extension)
items = weechat_string_split (
weechat_config_string (script_config_scripts_hold),
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -348,6 +349,7 @@ script_config_unhold (const char *name_with_extension)
items = weechat_string_split (
weechat_config_string (script_config_scripts_hold),
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c
index 42dbd85f4..0c4fe8046 100644
--- a/src/plugins/script/script-repo.c
+++ b/src/plugins/script/script-repo.c
@@ -943,16 +943,19 @@ script_repo_match_filter (struct t_script_repo *script)
if (!script_repo_filter || strcmp (script_repo_filter, "*") == 0)
return 1;
- words = weechat_string_split (script_repo_filter, " ",
+ words = weechat_string_split (script_repo_filter, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &num_words);
- tags = weechat_string_split ((script->tags) ? script->tags : "", ",",
+ tags = weechat_string_split ((script->tags) ? script->tags : "",
+ ",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
- 0, &num_tags);
+ 0,
+ &num_tags);
if (words)
{
for (i = 0; i < num_words; i++)
diff --git a/src/plugins/spell/spell-bar-item.c b/src/plugins/spell/spell-bar-item.c
index c6a1ae885..624bdb919 100644
--- a/src/plugins/spell/spell-bar-item.c
+++ b/src/plugins/spell/spell-bar-item.c
@@ -101,7 +101,7 @@ spell_bar_item_suggest (const void *pointer, void *data,
if (!str_suggest)
return NULL;
- suggestions = weechat_string_split (pos, "/",
+ suggestions = weechat_string_split (pos, "/", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -126,6 +126,7 @@ spell_bar_item_suggest (const void *pointer, void *data,
suggestions2 = weechat_string_split (
suggestions[i],
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/spell/spell-config.c b/src/plugins/spell/spell-config.c
index a677dfc3a..b35ca8be7 100644
--- a/src/plugins/spell/spell-config.c
+++ b/src/plugins/spell/spell-config.c
@@ -97,6 +97,7 @@ spell_config_change_commands (const void *pointer, void *data,
spell_commands_to_check = weechat_string_split (
value,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/spell/spell-speller.c b/src/plugins/spell/spell-speller.c
index 7250da39e..db2f0ecf6 100644
--- a/src/plugins/spell/spell-speller.c
+++ b/src/plugins/spell/spell-speller.c
@@ -99,7 +99,7 @@ spell_speller_check_dictionaries (const char *dict_list)
if (dict_list)
{
- argv = weechat_string_split (dict_list, ",",
+ argv = weechat_string_split (dict_list, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -227,7 +227,7 @@ spell_speller_add_dicts_to_hash (struct t_hashtable *hashtable,
if (!dict || !dict[0])
return;
- dicts = weechat_string_split (dict, ",",
+ dicts = weechat_string_split (dict, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -383,7 +383,7 @@ spell_speller_buffer_new (struct t_gui_buffer *buffer)
buffer_dicts = spell_get_dict (buffer);
if (buffer_dicts)
{
- dicts = weechat_string_split (buffer_dicts, ",",
+ dicts = weechat_string_split (buffer_dicts, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/trigger/trigger-buffer.c b/src/plugins/trigger/trigger-buffer.c
index 523b0fa44..c80424f14 100644
--- a/src/plugins/trigger/trigger-buffer.c
+++ b/src/plugins/trigger/trigger-buffer.c
@@ -91,6 +91,7 @@ trigger_buffer_set_filter (const char *filter)
trigger_buffer_filters = weechat_string_split (
filter,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/trigger/trigger-callback.c b/src/plugins/trigger/trigger-callback.c
index 711dd3647..6a67c3501 100644
--- a/src/plugins/trigger/trigger-callback.c
+++ b/src/plugins/trigger/trigger-callback.c
@@ -736,6 +736,7 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
tags = weechat_string_split (
pos2,
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -824,11 +825,14 @@ trigger_callback_line_cb (const void *pointer, void *data,
weechat_hashtable_set (pointers, "buffer", buffer);
ptr_value = weechat_hashtable_get (line, "tags");
- tags = weechat_string_split ((ptr_value) ? ptr_value : "", ",",
+ tags = weechat_string_split ((ptr_value) ? ptr_value : "",
+ ",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
- 0, &num_tags);
+ 0,
+ &num_tags);
/* build string with tags and commas around: ",tag1,tag2,tag3," */
length = 1 + strlen ((ptr_value) ? ptr_value : "") + 1 + 1;
diff --git a/src/plugins/trigger/trigger-command.c b/src/plugins/trigger/trigger-command.c
index c6db62a26..0dd2aa34d 100644
--- a/src/plugins/trigger/trigger-command.c
+++ b/src/plugins/trigger/trigger-command.c
@@ -682,11 +682,14 @@ trigger_command_trigger (const void *pointer, void *data,
goto end;
}
}
- items = weechat_string_split (trigger_hook_default_rc[type], ",",
+ items = weechat_string_split (trigger_hook_default_rc[type],
+ ",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
- 0, &num_items);
+ 0,
+ &num_items);
snprintf (input, sizeof (input),
"/trigger add name %s \"%s\" \"%s\" \"%s\" \"%s\"%s%s%s",
trigger_hook_type_string[type],
diff --git a/src/plugins/trigger/trigger-completion.c b/src/plugins/trigger/trigger-completion.c
index c3bad9fef..c1aa6462f 100644
--- a/src/plugins/trigger/trigger-completion.c
+++ b/src/plugins/trigger/trigger-completion.c
@@ -138,7 +138,7 @@ trigger_completion_option_value_cb (const void *pointer, void *data,
if (!args)
return WEECHAT_RC_OK;
- argv = weechat_string_split (args, " ",
+ argv = weechat_string_split (args, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -277,7 +277,7 @@ trigger_completion_add_default_for_hook (struct t_gui_completion *completion,
if (!args)
return;
- argv = weechat_string_split (args, " ",
+ argv = weechat_string_split (args, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -295,6 +295,7 @@ trigger_completion_add_default_for_hook (struct t_gui_completion *completion,
items = weechat_string_split (
default_strings[type],
split,
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c
index e5136a780..ea4f903b9 100644
--- a/src/plugins/trigger/trigger.c
+++ b/src/plugins/trigger/trigger.c
@@ -276,12 +276,14 @@ trigger_hook (struct t_trigger *trigger)
argv = weechat_string_split (
weechat_config_string (trigger->options[TRIGGER_OPTION_ARGUMENTS]),
";",
+ NULL,
0,
0,
&argc);
argv_eol = weechat_string_split (
weechat_config_string (trigger->options[TRIGGER_OPTION_ARGUMENTS]),
";",
+ NULL,
WEECHAT_STRING_SPLIT_KEEP_EOL,
0,
NULL);
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 008544554..abf329fc6 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -67,7 +67,7 @@ struct timeval;
* please change the date with current one; for a second change at same
* date, increment the 01, otherwise please keep 01.
*/
-#define WEECHAT_PLUGIN_API_VERSION "20190413-01"
+#define WEECHAT_PLUGIN_API_VERSION "20190615-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@@ -322,7 +322,8 @@ struct t_weechat_plugin
const char *text),
void *callback_data);
char **(*string_split) (const char *string, const char *separators,
- int flags, int num_items_max, int *num_items);
+ const char *strip_items, int flags,
+ int num_items_max, int *num_items);
char **(*string_split_shell) (const char *string, int *num_items);
void (*string_free_split) (char **split_string);
char *(*string_build_with_split_string) (const char **split_string,
@@ -1218,9 +1219,10 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
__reference_char, \
__callback, \
__callback_data)
-#define weechat_string_split(__string, __separator, __flags, __max, \
- __num_items) \
- (weechat_plugin->string_split)(__string, __separator, __flags, \
+#define weechat_string_split(__string, __separators, __strip_items, \
+ __flags, __max, __num_items) \
+ (weechat_plugin->string_split)(__string, __separators, \
+ __strip_items, __flags, \
__max, __num_items)
#define weechat_string_split_shell(__string, __num_items) \
(weechat_plugin->string_split_shell)(__string, __num_items)
diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c
index 00b0a7a26..c1372f2f3 100644
--- a/src/plugins/xfer/xfer.c
+++ b/src/plugins/xfer/xfer.c
@@ -541,6 +541,7 @@ xfer_nick_auto_accepted (const char *server, const char *nick)
nicks = weechat_string_split (
weechat_config_string (xfer_config_file_auto_accept_nicks),
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,