if (conn && conn->remote_host) {
if (!strcmp(hostname, conn->remote_host) && port == conn->remote_port) {
silc_say(client, conn, "You are already connected to that server");
if (conn && conn->remote_host) {
if (!strcmp(hostname, conn->remote_host) && port == conn->remote_port) {
silc_say(client, conn, "You are already connected to that server");
cmd->client->ops->disconnect(cmd->client, cmd->conn);
silc_client_close_connection(cmd->client, cmd->conn->sock);
}
cmd->client->ops->disconnect(cmd->client, cmd->conn);
silc_client_close_connection(cmd->client, cmd->conn->sock);
}
/* Connect asynchronously to not to block user interface */
silc_client_connect_to_server(cmd->client, port, hostname, NULL);
/* Connect asynchronously to not to block user interface */
silc_client_connect_to_server(cmd->client, port, hostname, NULL);