+ SilcClientCommandContext cmd = (SilcClientCommandContext)context;
+ SilcClientWindow win = NULL;
+ SilcBuffer buffer;
+ char *name;
+
+ if (!cmd->sock) {
+ SILC_NOT_CONNECTED(cmd->client);
+ goto out;
+ }
+
+ win = (SilcClientWindow)cmd->sock->user_data;
+
+ if (cmd->argc < 2)
+ name = strdup(win->remote_host);
+ else
+ name = strdup(cmd->argv[1]);
+
+ /* Send the command */
+ buffer = silc_command_encode_payload_va(SILC_COMMAND_INFO, 1,
+ 1, name, strlen(name));
+ silc_client_packet_send(cmd->client, win->sock, SILC_PACKET_COMMAND, NULL,
+ 0, NULL, NULL, buffer->data, buffer->len, TRUE);
+ silc_buffer_free(buffer);
+
+ out:
+ silc_client_command_free(cmd);