clients = silc_client_get_clients_local(silc_client, server->conn,
rec->nick, FALSE);
if (!clients) {
- printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
- "%s: There is no such client (did you mean %s?)", rec->nick,
- target->nickname);
+ if (strchr(rec->nick, '@') && target->server)
+ printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
+ "%s: There is no such client (did you mean %s@%s?)", rec->nick,
+ target->nickname, target->server);
+ else
+ printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
+ "%s: There is no such client (did you mean %s?)", rec->nick,
+ target->nickname);
goto out;
}
void *context)
{
SILC_SERVER_REC *server = context;
+ FtpSession ftp;
char *file;
SILC_LOG_DEBUG(("Connection callback %p, status %d, error %d, message %s",
silc_get_status_message(error), error,
message ? message : "");
+ /* Close FTP sessions */
+ silc_dlist_start(server->ftp_sessions);
+ while ((ftp = silc_dlist_get(server->ftp_sessions)))
+ silc_client_file_close(client, conn, ftp->session_id);
+ silc_dlist_uninit(server->ftp_sessions);
+
if (server->conn)
server->conn->context = NULL;
server->conn = NULL;
SILCTXT_REATTACH, server->tag);
silc_free(file);
+ /*
+ * Store the SILC_SERVER_REC in the stream context so that we can fetch it
+ * from the verify key exchange prompt. There should have been an initial
+ * user parameter value for the SilcClientConnection that could have been
+ * passed to SilcClientConnectionParams, but because there's no version
+ * number or size field in SilcClientConnectionParams, it is fixed for all
+ * time and not extendable.
+ *
+ * Instead, we must revert to pulling the SilcStream out of the
+ * SilcPacketStream associated with the SilcClientConnection object in the
+ * verify key exchange prompt callback in order to get our per-connection
+ * context. Hence, the extra levels of indirection.
+ */
+
+ silc_socket_stream_set_context(stream, server);
+
/* Start key exchange */
server->op = silc_client_key_exchange(silc_client, ¶ms,
irssi_pubkey, irssi_privkey,
if (!IS_SILC_SERVER(server))
return;
- silc_dlist_uninit(server->ftp_sessions);
+ /* If we have a prompt in progress, then abort it. */
+ if (server->prompt_op) {
+ silc_async_abort(server->prompt_op, NULL, NULL);
+ server->prompt_op = NULL;
+ }
if (server->conn) {
/* Close connection */