summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2017-07-26 10:57:05 +0200
committerGitHub <noreply@github.com>2017-07-26 10:57:05 +0200
commit437fbef6eb8f605320841cba119d3abbb3571a75 (patch)
tree83f2ed868a1c72348fcda7cd25b233da03b68ae2 /src/fe-common
parent6552fe4c6cdf8ba98ee9ca33d533ba9d1765cedf (diff)
parentd971c0292082823182f333a412207a9a8f6ad008 (diff)
downloadirssi-437fbef6eb8f605320841cba119d3abbb3571a75.zip
Merge pull request #719 from LemonBoy/sasl-disable-none
Setting sasl_mechanism to '' disables the auth
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/irc/fe-ircnet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fe-common/irc/fe-ircnet.c b/src/fe-common/irc/fe-ircnet.c
index b70a9ea7..24dad63f 100644
--- a/src/fe-common/irc/fe-ircnet.c
+++ b/src/fe-common/irc/fe-ircnet.c
@@ -163,11 +163,11 @@ static void cmd_network_add_modify(const char *data, gboolean add)
/* the validity of the parameters is checked in sig_server_setup_fill_chatnet */
value = g_hash_table_lookup(optlist, "sasl_mechanism");
- if (value != NULL && *value != '\0') rec->sasl_mechanism = g_strdup(value);
+ if (value != NULL) rec->sasl_mechanism = *value != '\0' ? g_strdup(value) : NULL;
value = g_hash_table_lookup(optlist, "sasl_username");
- if (value != NULL && *value != '\0') rec->sasl_username = g_strdup(value);
+ if (value != NULL) rec->sasl_username = *value != '\0' ? g_strdup(value) : NULL;
value = g_hash_table_lookup(optlist, "sasl_password");
- if (value != NULL && *value != '\0') rec->sasl_password = g_strdup(value);
+ if (value != NULL) rec->sasl_password = *value != '\0' ? g_strdup(value) : NULL;
ircnet_create(rec);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_NETWORK_ADDED, name);