- return clients;
-}
-
-/* Returns all clients matching requested nickname. Number of clients is
- returned to `clients_count'. Caller must free the returned table. */
-/* XXX This actually checks the data, which can be hash of the nickname
- but is not if the client is local client. Global client on global
- list may have hash. Thus, this is not fully reliable function.
- Instead this should probably check the hash from the list of client ID's. */
-
-SilcClientEntry *
-silc_idlist_get_clients_by_hash(SilcIDList id_list, char *nickname,
- SilcHash md5hash,
- unsigned int *clients_count)
-{
- SilcIDCacheList list = NULL;
- SilcIDCacheEntry id_cache = NULL;
- SilcClientEntry *clients;
- unsigned char hash[32];
- int i;
-
- SILC_LOG_DEBUG(("Start"));
-
- silc_hash_make(md5hash, nickname, strlen(nickname), hash);
-
- if (!silc_idcache_find_by_data(id_list->clients, hash, &list))
- return NULL;
-
- clients = silc_calloc(silc_idcache_list_count(list), sizeof(*clients));
-
- i = 0;
- silc_idcache_list_first(list, &id_cache);
- clients[i++] = (SilcClientEntry)id_cache->context;
-
- while (silc_idcache_list_next(list, &id_cache))
- clients[i++] = (SilcClientEntry)id_cache->context;
-