chu->mode & SILC_CHANNEL_UMODE_CHANOP &&
!(chu->mode & SILC_CHANNEL_UMODE_CHANFO))
return;
+ if (chu->mode & SILC_CHANNEL_UMODE_QUIET)
+ return;
/* Take the key to be used */
if (channel->mode & SILC_CHANNEL_MODE_PRIVKEY) {
for (i = 0; i < iv_len; i++) channel->iv[i] =
silc_rng_get_byte(client->rng);
else
- silc_hash_make(client->internal->md5hash, channel->iv, iv_len,
- channel->iv);
+ silc_hash_make(client->md5hash, channel->iv, iv_len, channel->iv);
/* Encode the channel payload. This also encrypts the message payload. */
payload = silc_channel_message_payload_encode(flags, data_len, data, iv_len,
/* Find client entry */
client_entry = silc_client_get_client_by_id(client, conn, client_id);
- if (!client_entry || !client_entry->nickname) {
+ if (!client_entry || !client_entry->nickname ||
+ !silc_client_on_channel(channel, client_entry)) {
/* Resolve the client info */
SilcChannelClientResolve res = silc_calloc(1, sizeof(*res));
res->payload = payload;
res->channel_id = id;
- silc_client_get_client_by_id_resolve(client, conn, client_id,
+ silc_client_get_client_by_id_resolve(client, conn, client_id, NULL,
silc_client_channel_message_cb,
res);
payload = NULL;
goto out;
}
- if (!silc_client_on_channel(channel, client_entry)) {
- SILC_LOG_WARNING(("Received channel message from client not on channel"));
- goto out;
- }
-
message = silc_channel_message_get_data(payload, &message_len);
/* Pass the message to application */
/* Produce the key material */
keymat = silc_calloc(1, sizeof(*keymat));
if (silc_ske_process_key_material_data(key, key_len, 16, 256, 16,
- client->internal->md5hash, keymat)
+ client->md5hash, keymat)
!= SILC_SKE_STATUS_OK)
return FALSE;