- if (cmd->argc < 2 || cmd->argc > 3) {
- cmd->client->ops->say(cmd->client, conn,
- "Usage: /WHOIS <nickname>[@<server>] [<count>]");
- COMMAND_ERROR;
+ /* Given without arguments fetches client's own information */
+ if (cmd->argc < 2) {
+ buffer = silc_id_payload_encode(cmd->conn->local_id, SILC_ID_CLIENT);
+ silc_client_send_command(cmd->client, cmd->conn, SILC_COMMAND_WHOIS,
+ ++conn->cmd_ident,
+ 1, 3, buffer->data, buffer->len);
+ silc_buffer_free(buffer);