updates.
[silc.git] / apps / silcd / command_reply.c
index 68e6143337f85ff6aaa16c92a911ce1a0d80b35f..dee4e0bef9bcd7a1838c08a96a06445caec96082 100644 (file)
@@ -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);