diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2015-09-26 19:07:54 +0200 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2015-09-26 19:07:54 +0200 |
commit | 18989e76dbf42d39ce1906d37cf5bfcc43422f32 (patch) | |
tree | 9de880545a74fdd4d2207c5bf2de6f141de4cf9d /src/irc | |
parent | 815862b68899c72e5587002c37cec286df0c82f2 (diff) | |
parent | 1a2c479bc04cdb6758ca9f1976e235b092cc83fb (diff) | |
download | irssi-18989e76dbf42d39ce1906d37cf5bfcc43422f32.zip |
Merge pull request #304 from LemonBoy/sasl_user_options
Allow the user to set and modify the SASL parameters
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-chatnets.c | 12 | ||||
-rw-r--r-- | src/irc/core/irc-servers-setup.c | 2 |
2 files changed, 9 insertions, 5 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); + } } diff --git a/src/irc/core/irc-servers-setup.c b/src/irc/core/irc-servers-setup.c index f5e4f8f4..bf1d2ddf 100644 --- a/src/irc/core/irc-servers-setup.c +++ b/src/irc/core/irc-servers-setup.c @@ -81,7 +81,7 @@ static void sig_server_setup_fill_chatnet(IRC_SERVER_CONNECT_REC *conn, if (ircnet->max_query_chans > 0) conn->max_query_chans = ircnet->max_query_chans; - /* Validate the SASL parameters filled by sig_chatnet_read() */ + /* Validate the SASL parameters filled by sig_chatnet_read() or cmd_network_add */ conn->sasl_mechanism = SASL_MECHANISM_NONE; if (ircnet->sasl_mechanism != NULL) { |