SilcCommandStatus status;
SilcChannelID *id;
SilcChannelEntry entry;
+ SilcHmac hmac = NULL;
unsigned int id_len, len;
unsigned char *id_string;
char *channel_name, *tmp;
if (!id)
goto out;
+ /* Get hmac */
+ tmp = silc_argument_get_arg_type(cmd->args, 10, NULL);
+ if (tmp) {
+ if (!silc_hmac_alloc(tmp, NULL, &hmac))
+ goto out;
+ }
+
/* See whether we already have the channel. */
entry = silc_idlist_find_channel_by_id(server->local_list, id, NULL);
if (!entry) {
/* Add the channel to our local list. */
entry = silc_idlist_add_channel(server->local_list, strdup(channel_name),
SILC_CHANNEL_MODE_NONE, id,
- server->router, NULL);
+ server->router, NULL, hmac);
if (!entry) {
silc_free(id);
goto out;