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;