From a6c4e4737602be55e62ab180b550d959d547c269 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 26 Aug 2002 19:40:04 +0000 Subject: [PATCH] A few missing parts from SSL patch. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2891 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/irc/fe-irc-server.c | 4 +++- src/irc/core/irc-servers.c | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/fe-common/irc/fe-irc-server.c b/src/fe-common/irc/fe-irc-server.c index 8b01c3a4..44563000 100644 --- a/src/fe-common/irc/fe-irc-server.c +++ b/src/fe-common/irc/fe-irc-server.c @@ -50,7 +50,7 @@ const char *get_visible_target(IRC_SERVER_REC *server, const char *target) return target; } -/* SYNTAX: SERVER ADD [-4 | -6] [-auto | -noauto] [-ircnet ] +/* SYNTAX: SERVER ADD [-4 | -6] [-ssl] [-auto | -noauto] [-ircnet ] [-host ] [-cmdspeed ] [-cmdmax ] [-port ]
[ []] */ static void sig_server_add_fill(IRC_SERVER_SETUP_REC *rec, @@ -98,6 +98,8 @@ static void cmd_server_list(const char *data) g_string_append(str, "autoconnect, "); if (rec->no_proxy) g_string_append(str, "noproxy, "); + if (rec->use_ssl) + g_string_append(str, "SSL, "); if (rec->max_cmds_at_once > 0) g_string_sprintfa(str, "cmdmax: %d, ", rec->max_cmds_at_once); if (rec->cmd_queue_speed > 0) diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 5e5dba55..5ead92f9 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -166,8 +166,10 @@ SERVER_REC *irc_server_init_connect(SERVER_CONNECT_REC *conn) server->connrec = ircconn; server_connect_ref(conn); - if (server->connrec->port <= 0) - server->connrec->port = 6667; + if (server->connrec->port <= 0) { + server->connrec->port = + server->connrec->use_ssl ? 9999 : 6667; + } server->cmd_queue_speed = ircconn->cmd_queue_speed > 0 ? ircconn->cmd_queue_speed : settings_get_int("cmd_queue_speed"); @@ -184,6 +186,7 @@ SERVER_REC *irc_server_init_connect(SERVER_CONNECT_REC *conn) ircconn->max_whois : DEFAULT_MAX_WHOIS; server->max_msgs_in_cmd = ircconn->max_msgs > 0 ? ircconn->max_msgs : DEFAULT_MAX_MSGS; + server->connrec->use_ssl = conn->use_ssl; server_connect_init((SERVER_REC *) server); return (SERVER_REC *) server;