if (trie_set(&chan->o, client->key, client, NULL) == -1)
abort();
} else {
+ if (trie_get(&chan->members, client->key))
+ return;
// TODO: check key
// TODO: check limit
// TODO: check ban
}
void channel_part(struct client_data *client, struct channel *chan, const char *reason)
{
+ if (!trie_get(&chan->members, client->key))
+ return;
if (reason) {
msg_part(client, chan, *reason ? reason : NULL);
sendbuf_chan(chan);