+ /* Cache the received name list and client ID's. This cache expires
+ whenever server sends notify message to channel. It means to things;
+ some user has joined or leaved the channel. */
+ for (i = 0; i < list_count; i++) {
+ int nick_len = strcspn(name_list, " ");
+ char *nickname = silc_calloc(nick_len, sizeof(*nickname));
+ SilcClientID *client_id;
+ SilcClientEntry client;
+
+ memcpy(nickname, name_list, nick_len);
+ client_id = silc_id_str2id(client_id_list->data, SILC_ID_CLIENT_LEN);
+ silc_buffer_pull(client_id_list, SILC_ID_CLIENT_LEN);
+
+ client = silc_calloc(1, sizeof(*client));
+ client->id = client_id;
+ client->nickname = nickname;
+
+ CLCC(nickname[0]) = silc_idcache_add(&CLC(nickname[0]), CLCC(nickname[0]),
+ nickname, SILC_ID_CLIENT,
+ client_id, (void *)client);
+
+ name_list = name_list + nick_len + 1;
+ }
+
+ silc_buffer_free(client_id_list);
+