X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fclient_channel.c;h=51fc85471d11a358d2be3727a237c9bfc60957de;hb=124293f6809a8200f041c276d1846cb5de4dedf2;hp=bb5c071e4c49eb69e8affdc51c5b8dc2e41fc4ab;hpb=7b16a3dad6b46e0af295904c21232d5cb3732ee3;p=silc.git diff --git a/lib/silcclient/client_channel.c b/lib/silcclient/client_channel.c index bb5c071e..51fc8547 100644 --- a/lib/silcclient/client_channel.c +++ b/lib/silcclient/client_channel.c @@ -202,6 +202,13 @@ SILC_FSM_STATE(silc_client_channel_message) return SILC_FSM_CONTINUE; } + /* Check that user is on channel */ + if (!silc_client_on_channel(channel, client_entry)) { + /** User not on channel */ + silc_fsm_next(fsm, silc_client_channel_message_error); + return SILC_FSM_CONTINUE; + } + /* If there is no channel private key then just decrypt the message with the channel key. If private keys are set then just go through all private keys and check what decrypts correctly. */