X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fcommand.c;h=efb1765f42179f86526c53acc320b17ae4fea9b4;hb=fcb758c33d49c63fedff73fd184da7102c332c05;hp=b23149360466262c0d358472f4e2ea6c4aad8b95;hpb=6fa729df25868c60daa2ddb1805d868fe068c640;p=silc.git diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index b2314936..efb1765f 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -966,8 +966,11 @@ SILC_CLIENT_CMD_FUNC(join) /* See if we have joined to the requested channel already */ if (silc_idcache_find_by_name_one(conn->channel_cache, cmd->argv[1], - &id_cache)) - goto out; + &id_cache)) { + SilcChannelEntry channel = (SilcChannelEntry)id_cache->context; + if (channel->on_channel) + goto out; + } idp = silc_id_payload_encode(conn->local_id, SILC_ID_CLIENT); @@ -2012,6 +2015,7 @@ SILC_CLIENT_CMD_FUNC(leave) } channel = (SilcChannelEntry)id_cache->context; + channel->on_channel = FALSE; /* Send LEAVE command to the server */ idp = silc_id_payload_encode(id_cache->id, SILC_ID_CHANNEL);