+ /* Get hmac */
+ hmac = silc_argument_get_arg_type(args, 11, NULL);
+ if (hmac) {
+ if (!silc_hmac_alloc(hmac, NULL, &channel->internal.hmac)) {
+ if (cmd->verbose)
+ SAY(client, conn, SILC_CLIENT_MESSAGE_ERROR,
+ "Cannot join channel: Unsupported HMAC `%s'", hmac);
+ ERROR_CALLBACK(SILC_STATUS_ERR_UNKNOWN_ALGORITHM);
+ goto out;
+ }
+ }
+
+ /* Get channel mode */
+ tmp = silc_argument_get_arg_type(args, 5, NULL);
+ if (tmp)
+ SILC_GET32_MSB(mode, tmp);
+ channel->mode = mode;
+
+ /* Get channel key and save it */
+ tmp = silc_argument_get_arg_type(args, 7, &len);
+ if (tmp) {
+ silc_buffer_set(&keyp, tmp, len);
+ silc_client_save_channel_key(client, conn, &keyp, channel);
+ }
+
+ /* Get topic */
+ topic = silc_argument_get_arg_type(args, 10, NULL);
+ if (topic) {
+ silc_free(channel->topic);
+ channel->topic = silc_memdup(topic, strlen(topic));
+ }