mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
fix reading of starttls = "no" in config, attempt 2
This commit is contained in:
parent
6c47fcf10d
commit
1a6d74ac26
@ -188,6 +188,7 @@ static void init_userinfo(void)
|
|||||||
|
|
||||||
static void sig_server_setup_read(IRC_SERVER_SETUP_REC *rec, CONFIG_NODE *node)
|
static void sig_server_setup_read(IRC_SERVER_SETUP_REC *rec, CONFIG_NODE *node)
|
||||||
{
|
{
|
||||||
|
int starttls;
|
||||||
g_return_if_fail(rec != NULL);
|
g_return_if_fail(rec != NULL);
|
||||||
g_return_if_fail(node != NULL);
|
g_return_if_fail(node != NULL);
|
||||||
|
|
||||||
@ -197,7 +198,10 @@ static void sig_server_setup_read(IRC_SERVER_SETUP_REC *rec, CONFIG_NODE *node)
|
|||||||
rec->max_cmds_at_once = config_node_get_int(node, "cmds_max_at_once", 0);
|
rec->max_cmds_at_once = config_node_get_int(node, "cmds_max_at_once", 0);
|
||||||
rec->cmd_queue_speed = config_node_get_int(node, "cmd_queue_speed", 0);
|
rec->cmd_queue_speed = config_node_get_int(node, "cmd_queue_speed", 0);
|
||||||
rec->max_query_chans = config_node_get_int(node, "max_query_chans", 0);
|
rec->max_query_chans = config_node_get_int(node, "max_query_chans", 0);
|
||||||
rec->starttls = config_node_get_bool(node, "starttls", STARTTLS_NOTSET);
|
starttls = config_node_get_bool(node, "starttls", -1);
|
||||||
|
rec->starttls = starttls == -1 ? STARTTLS_NOTSET :
|
||||||
|
starttls == 0 ? STARTTLS_DISALLOW :
|
||||||
|
STARTTLS_ENABLED;
|
||||||
if (rec->starttls == STARTTLS_ENABLED) {
|
if (rec->starttls == STARTTLS_ENABLED) {
|
||||||
rec->use_tls = 0;
|
rec->use_tls = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user