Fixed invite and ban list handling in command reply.
[silc.git] / apps / silcd / idlist.c
index 6a4d5f767068236bdd717a67a06bbd02beccebcf..ae9e79497f3f87799f8926c144c3328055f8777b 100644 (file)
@@ -676,31 +676,10 @@ int silc_idlist_del_channel(SilcIDList id_list, SilcChannelEntry entry)
     silc_free(entry->id);
     silc_free(entry->topic);
 
-    if (entry->invite_list) {
-      silc_hash_table_list(entry->invite_list, &htl);
-      while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp)) {
-       if (type == 1) {
-         silc_free((char *)tmp);
-         continue;
-       }
-       silc_buffer_free(tmp);
-      }
-      silc_hash_table_list_reset(&htl);
+    if (entry->invite_list)
       silc_hash_table_free(entry->invite_list);
-    }
-
-    if (entry->ban_list) {
-      silc_hash_table_list(entry->ban_list, &htl);
-      while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp)) {
-       if (type == 1) {
-         silc_free((char *)tmp);
-         continue;
-       }
-       silc_buffer_free(tmp);
-      }
-      silc_hash_table_list_reset(&htl);
+    if (entry->ban_list)
       silc_hash_table_free(entry->ban_list);
-    }
 
     if (entry->channel_key)
       silc_cipher_free(entry->channel_key);