summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-chatnets.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2015-09-26 18:53:10 +0200
committerLemonBoy <thatlemon@gmail.com>2015-09-26 18:53:10 +0200
commit1a2c479bc04cdb6758ca9f1976e235b092cc83fb (patch)
treee5ccc2c7c8b75f89a7b07eb0e1eb184484407342 /src/irc/core/irc-chatnets.c
parentf247a43b97731cd1d58ec765dd2d10f885ef66dc (diff)
downloadirssi-1a2c479bc04cdb6758ca9f1976e235b092cc83fb.zip
Allow the user to set and modify the SASL parameters
The /NETWORK ADD command now is able to modify the SASL mechanism, the username and the password on a chatnet basis.
Diffstat (limited to 'src/irc/core/irc-chatnets.c')
-rw-r--r--src/irc/core/irc-chatnets.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/irc/core/irc-chatnets.c b/src/irc/core/irc-chatnets.c
index b9b221b8..d72f71dd 100644
--- a/src/irc/core/irc-chatnets.c
+++ b/src/irc/core/irc-chatnets.c
@@ -49,9 +49,9 @@ static void sig_chatnet_read(IRC_CHATNET_REC *rec, CONFIG_NODE *node)
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);
+ rec->sasl_mechanism = g_strdup(config_node_get_str(node, "sasl_mechanism", NULL));
+ rec->sasl_username = g_strdup(config_node_get_str(node, "sasl_username", NULL));
+ rec->sasl_password = g_strdup(config_node_get_str(node, "sasl_password", NULL));
}
static void sig_chatnet_saved(IRC_CHATNET_REC *rec, CONFIG_NODE *node)
@@ -88,8 +88,12 @@ 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))
+ if (IS_IRC_CHATNET(rec)) {
g_free(rec->usermode);
+ g_free(rec->sasl_mechanism);
+ g_free(rec->sasl_username);
+ g_free(rec->sasl_password);
+ }
}