X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand_reply.c;h=dee4e0bef9bcd7a1838c08a96a06445caec96082;hb=386c883d8774999c6e74d7c6c37e52e4163a4cb1;hp=68e6143337f85ff6aaa16c92a911ce1a0d80b35f;hpb=3b7e91692359215ef5e701b2c2ee50f4ff440944;p=silc.git diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index 68e61433..dee4e0be 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -918,16 +918,14 @@ SILC_SERVER_CMD_REPLY_FUNC(join) tmp = silc_argument_get_arg_type(cmd->args, 8, &len); if (tmp) { silc_free(entry->ban_list); - entry->ban_list = silc_calloc(len, sizeof(*entry->ban_list)); - memcpy(entry->ban_list, tmp, len); + entry->ban_list = silc_memdup(tmp, len); } /* Get the invite list */ tmp = silc_argument_get_arg_type(cmd->args, 9, &len); if (tmp) { silc_free(entry->invite_list); - entry->invite_list = silc_calloc(len, sizeof(*entry->invite_list)); - memcpy(entry->invite_list, tmp, len); + entry->invite_list = silc_memdup(tmp, len); } /* Get the topic */ @@ -1201,6 +1199,8 @@ SILC_SERVER_CMD_REPLY_FUNC(list) cache->expire = time(NULL) + 60; } + channel->user_count = usercount; + if (topic) { silc_free(channel->topic); channel->topic = strdup(topic);