SASL support

The only supported methods are PLAIN and EXTERNAL, the latter is untested as of
now.
The code gets the values from the keys named sasl_{mechanism,username,password}
specified for each chatnet.
This commit is contained in:
LemonBoy 2015-09-10 01:02:44 +02:00
commit b8d3301d34
10 changed files with 200 additions and 5 deletions

View file

@ -48,6 +48,10 @@ static void sig_chatnet_read(IRC_CHATNET_REC *rec, CONFIG_NODE *node)
rec->max_msgs = config_node_get_int(node, "max_msgs", 0);
rec->max_modes = config_node_get_int(node, "max_modes", 0);
rec->max_whois = config_node_get_int(node, "max_whois", 0);
rec->sasl_mechanism = config_node_get_str(node, "sasl_mechanism", NULL);
rec->sasl_username = config_node_get_str(node, "sasl_username", NULL);
rec->sasl_password = config_node_get_str(node, "sasl_password", NULL);
}
static void sig_chatnet_saved(IRC_CHATNET_REC *rec, CONFIG_NODE *node)
@ -78,7 +82,7 @@ static void sig_chatnet_saved(IRC_CHATNET_REC *rec, CONFIG_NODE *node)
static void sig_chatnet_destroyed(IRC_CHATNET_REC *rec)
{
if (IS_IRC_CHATNET(rec))
g_free(rec->usermode);
g_free(rec->usermode);
}