summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-chatnets.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2015-09-10 01:02:44 +0200
committerLemonBoy <thatlemon@gmail.com>2015-09-11 00:30:16 +0200
commitb8d3301d34f383f039071214872570385de1bb59 (patch)
treedd91cc69d8bcc9fa62f7d8a768e2d72f855202c1 /src/irc/core/irc-chatnets.c
parent762c1d7f2c7478f1e98f847352e6cb3ca889c580 (diff)
downloadirssi-b8d3301d34f383f039071214872570385de1bb59.zip
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.
Diffstat (limited to 'src/irc/core/irc-chatnets.c')
-rw-r--r--src/irc/core/irc-chatnets.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/irc/core/irc-chatnets.c b/src/irc/core/irc-chatnets.c
index d757bf8d..cfb7deec 100644
--- a/src/irc/core/irc-chatnets.c
+++ b/src/irc/core/irc-chatnets.c
@@ -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);
}