kike: actually use irc_is_valid_key()
This commit is contained in:
parent
1a7ac7b3ca
commit
05c6bf63bb
8
kike.c
8
kike.c
|
@ -1856,9 +1856,10 @@ mode_processor_do_key (struct mode_processor *self)
|
||||||
free (self->channel->key);
|
free (self->channel->key);
|
||||||
self->channel->key = NULL;
|
self->channel->key = NULL;
|
||||||
}
|
}
|
||||||
else
|
else if (!irc_is_valid_key (target))
|
||||||
{
|
// TODO: we should notify the user somehow
|
||||||
if (self->channel->key)
|
return;
|
||||||
|
else if (self->channel->key)
|
||||||
irc_send_reply (self->c, IRC_ERR_KEYSET, self->channel->name);
|
irc_send_reply (self->c, IRC_ERR_KEYSET, self->channel->name);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1867,7 +1868,6 @@ mode_processor_do_key (struct mode_processor *self)
|
||||||
str_vector_add (&self->added_params, self->channel->key);
|
str_vector_add (&self->added_params, self->channel->key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mode_processor_do_limit (struct mode_processor *self)
|
mode_processor_do_limit (struct mode_processor *self)
|
||||||
|
|
Loading…
Reference in New Issue