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