aboutsummaryrefslogtreecommitdiff
path: root/kike.c
diff options
context:
space:
mode:
Diffstat (limited to 'kike.c')
-rw-r--r--kike.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/kike.c b/kike.c
index e47c9aa..affb4ed 100644
--- a/kike.c
+++ b/kike.c
@@ -1403,7 +1403,7 @@ irc_handle_cap (const struct irc_message *msg, struct client *c)
if (msg->params.len > 1)
{
args.full_params = msg->params.vector[1];
- cstr_split_ignore_empty (args.full_params, ' ', &args.params);
+ cstr_split (args.full_params, " ", true, &args.params);
}
struct irc_cap_command *cmd =
@@ -2186,7 +2186,7 @@ irc_handle_list (const struct irc_message *msg, struct client *c)
{
struct str_vector channels;
str_vector_init (&channels);
- cstr_split_ignore_empty (msg->params.vector[0], ',', &channels);
+ cstr_split (msg->params.vector[0], ",", true, &channels);
for (size_t i = 0; i < channels.len; i++)
if ((chan = str_map_find (&c->ctx->channels, channels.vector[i]))
&& (!(chan->modes & IRC_CHAN_MODE_SECRET)
@@ -2317,7 +2317,7 @@ irc_handle_names (const struct irc_message *msg, struct client *c)
{
struct str_vector channels;
str_vector_init (&channels);
- cstr_split_ignore_empty (msg->params.vector[0], ',', &channels);
+ cstr_split (msg->params.vector[0], ",", true, &channels);
for (size_t i = 0; i < channels.len; i++)
if ((chan = str_map_find (&c->ctx->channels, channels.vector[i]))
&& (!(chan->modes & IRC_CHAN_MODE_SECRET)
@@ -2480,7 +2480,7 @@ irc_handle_whois (const struct irc_message *msg, struct client *c)
struct str_vector masks;
str_vector_init (&masks);
const char *masks_str = msg->params.vector[msg->params.len > 1];
- cstr_split_ignore_empty (masks_str, ',', &masks);
+ cstr_split (masks_str, ",", true, &masks);
for (size_t i = 0; i < masks.len; i++)
{
const char *mask = masks.vector[i];
@@ -2521,7 +2521,7 @@ irc_handle_whowas (const struct irc_message *msg, struct client *c)
struct str_vector nicks;
str_vector_init (&nicks);
- cstr_split_ignore_empty (msg->params.vector[0], ',', &nicks);
+ cstr_split (msg->params.vector[0], ",", true, &nicks);
for (size_t i = 0; i < nicks.len; i++)
{
@@ -2641,7 +2641,7 @@ irc_handle_part (const struct irc_message *msg, struct client *c)
const char *reason = msg->params.len > 1 ? msg->params.vector[1] : NULL;
struct str_vector channels;
str_vector_init (&channels);
- cstr_split_ignore_empty (msg->params.vector[0], ',', &channels);
+ cstr_split (msg->params.vector[0], ",", true, &channels);
for (size_t i = 0; i < channels.len; i++)
irc_try_part (c, channels.vector[i], reason);
str_vector_free (&channels);
@@ -2692,8 +2692,8 @@ irc_handle_kick (const struct irc_message *msg, struct client *c)
struct str_vector users;
str_vector_init (&channels);
str_vector_init (&users);
- cstr_split_ignore_empty (msg->params.vector[0], ',', &channels);
- cstr_split_ignore_empty (msg->params.vector[1], ',', &users);
+ cstr_split (msg->params.vector[0], ",", true, &channels);
+ cstr_split (msg->params.vector[1], ",", true, &users);
if (channels.len == 1)
for (size_t i = 0; i < users.len; i++)
@@ -2821,9 +2821,9 @@ irc_handle_join (const struct irc_message *msg, struct client *c)
struct str_vector keys;
str_vector_init (&channels);
str_vector_init (&keys);
- cstr_split_ignore_empty (msg->params.vector[0], ',', &channels);
+ cstr_split (msg->params.vector[0], ",", true, &channels);
if (msg->params.len > 1)
- cstr_split_ignore_empty (msg->params.vector[1], ',', &keys);
+ cstr_split (msg->params.vector[1], ",", true, &keys);
for (size_t i = 0; i < channels.len; i++)
irc_try_join (c, channels.vector[i],
@@ -3744,7 +3744,7 @@ irc_parse_config (struct server_context *ctx, struct error **e)
str_vector_init (&fingerprints);
const char *operators = str_map_find (&ctx->config, "operators");
if (operators)
- cstr_split_ignore_empty (operators, ',', &fingerprints);
+ cstr_split (operators, ",", true, &fingerprints);
for (size_t i = 0; i < fingerprints.len; i++)
{
const char *key = fingerprints.vector[i];
@@ -3905,7 +3905,7 @@ irc_setup_listen_fds (struct server_context *ctx, struct error **e)
struct str_vector ports;
str_vector_init (&ports);
- cstr_split_ignore_empty (bind_port, ',', &ports);
+ cstr_split (bind_port, ",", true, &ports);
ctx->listen_fds = xcalloc (ports.len, sizeof *ctx->listen_fds);
ctx->listen_events = xcalloc (ports.len, sizeof *ctx->listen_events);
for (size_t i = 0; i < ports.len; i++)