mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 08:02:13 +02:00
changes suggested by ahf
This commit is contained in:
parent
51508ff1d3
commit
9668217509
7 changed files with 36 additions and 29 deletions
|
|
@ -1053,7 +1053,7 @@ void irc_commands_init(void)
|
|||
signal_add("whois end", (SIGNAL_FUNC) event_end_of_whois);
|
||||
signal_add("whowas event", (SIGNAL_FUNC) event_whowas);
|
||||
|
||||
command_set_options("connect", "+ircnet starttls nostarttls");
|
||||
command_set_options("connect", "+ircnet starttls disallow_starttls");
|
||||
command_set_options("topic", "delete");
|
||||
command_set_options("list", "yes");
|
||||
command_set_options("away", "one all");
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static void sig_server_connect_copy(SERVER_CONNECT_REC **dest,
|
|||
rec->sasl_mechanism = src->sasl_mechanism;
|
||||
rec->sasl_username = g_strdup(src->sasl_username);
|
||||
rec->sasl_password = g_strdup(src->sasl_password);
|
||||
rec->no_starttls = src->no_starttls;
|
||||
rec->disallow_starttls = src->disallow_starttls;
|
||||
rec->starttls = src->starttls;
|
||||
*dest = (SERVER_CONNECT_REC *) rec;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ static void sig_server_setup_fill_reconn(IRC_SERVER_CONNECT_REC *conn,
|
|||
if (sserver->max_query_chans > 0)
|
||||
conn->max_query_chans = sserver->max_query_chans;
|
||||
if (sserver->starttls == 0)
|
||||
conn->no_starttls = 1;
|
||||
conn->disallow_starttls = 1;
|
||||
else if (sserver->starttls == 1)
|
||||
conn->starttls = 1;
|
||||
}
|
||||
|
|
@ -67,8 +67,8 @@ static void sig_server_setup_fill_connect(IRC_SERVER_CONNECT_REC *conn, GHashTab
|
|||
|
||||
if (g_hash_table_lookup(optlist, "starttls") != NULL)
|
||||
conn->starttls = 1;
|
||||
else if (g_hash_table_lookup(optlist, "nostarttls") != NULL)
|
||||
conn->no_starttls = 1;
|
||||
else if (g_hash_table_lookup(optlist, "disallow_starttls") != NULL)
|
||||
conn->disallow_starttls = 1;
|
||||
}
|
||||
|
||||
static void sig_server_setup_fill_chatnet(IRC_SERVER_CONNECT_REC *conn,
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ static void server_init_1(IRC_SERVER_REC *server)
|
|||
irc_cap_toggle(server, CAP_ACCOUNT_NOTIFY, TRUE);
|
||||
irc_cap_toggle(server, CAP_SELF_MESSAGE, TRUE);
|
||||
irc_cap_toggle(server, CAP_SERVER_TIME, TRUE);
|
||||
if (!conn->use_tls && (conn->starttls || !conn->no_starttls)) {
|
||||
if (!conn->use_tls && (conn->starttls || !conn->disallow_starttls)) {
|
||||
irc_cap_toggle(server, CAP_STARTTLS, TRUE);
|
||||
}
|
||||
|
||||
|
|
@ -314,7 +314,7 @@ void irc_server_send_starttls(IRC_SERVER_REC *server)
|
|||
{
|
||||
g_return_if_fail(server != NULL);
|
||||
|
||||
g_warning("Now attempting STARTTLS");
|
||||
g_warning("[%s] Now attempting STARTTLS", server->tag);
|
||||
irc_send_cmd_now(server, "STARTTLS");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ struct _IRC_SERVER_CONNECT_REC {
|
|||
int max_query_chans;
|
||||
|
||||
int max_kicks, max_msgs, max_modes, max_whois;
|
||||
int no_starttls:1;
|
||||
int disallow_starttls:1;
|
||||
int starttls:1;
|
||||
};
|
||||
/* clang-format on */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue