- if (!conn->current_channel) {
- cmd->client->ops->say(cmd->client, conn, "You are not on that channel");
- COMMAND_ERROR;
- goto out;
- }
-
- /* Get the Channel ID of the channel */
- if (!silc_idcache_find_by_name_one(conn->channel_cache, name, &id_cache)) {
- /* XXX should resolve the channel ID; LIST command */
- cmd->client->ops->say(cmd->client, conn,
- "You are not on that channel", name);
- COMMAND_ERROR;
- goto out;
- }
-
- channel = (SilcChannelEntry)id_cache->context;
-
- if (!cmd->pending) {
- /* Send USERS command to the server */
- idp = silc_id_payload_encode(id_cache->id, SILC_ID_CHANNEL);
- buffer = silc_command_payload_encode_va(SILC_COMMAND_USERS,
- ++conn->cmd_ident, 1,
- 1, idp->data, idp->len);
- silc_client_packet_send(cmd->client, conn->sock, SILC_PACKET_COMMAND,
- NULL, 0, NULL, NULL, buffer->data,
- buffer->len, TRUE);
- silc_buffer_free(buffer);
- silc_buffer_free(idp);
-
- /* Register pending callback which will recall this command callback with
- same context and reprocesses the command. When reprocessing we actually
- display the information on the screen. */
- silc_client_command_pending(conn, SILC_COMMAND_USERS, conn->cmd_ident,
- silc_client_command_destructor,
- silc_client_command_users,
- silc_client_command_dup(cmd));
- cmd->pending = TRUE;
- return;
- }
+ /* Send USERS command to the server */
+ buffer = silc_command_payload_encode_va(SILC_COMMAND_USERS,
+ ++conn->cmd_ident, 1,
+ 2, name, strlen(name));
+ silc_client_packet_send(cmd->client, conn->sock, SILC_PACKET_COMMAND,
+ NULL, 0, NULL, NULL, buffer->data,
+ buffer->len, TRUE);
+ silc_buffer_free(buffer);