diff options
author | Paul Townsend <pt@mindvox.org> | 2017-10-14 17:42:45 +0100 |
---|---|---|
committer | Paul Townsend <pt@mindvox.org> | 2017-10-14 17:42:45 +0100 |
commit | 7b94015f8f3a7f9f9348a57243632a98cb5e2a56 (patch) | |
tree | d499c6bb027ff200902ba27eecef9fe7725268b5 /src/irc/core/irc-chatnets.c | |
parent | 87955b69cb82314becf1aa9f66c707705f517d0f (diff) | |
download | irssi-7b94015f8f3a7f9f9348a57243632a98cb5e2a56.zip |
Changes based on comments in pull #771.
Diffstat (limited to 'src/irc/core/irc-chatnets.c')
-rw-r--r-- | src/irc/core/irc-chatnets.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/irc/core/irc-chatnets.c b/src/irc/core/irc-chatnets.c index 0796e0cb..98ce89c3 100644 --- a/src/irc/core/irc-chatnets.c +++ b/src/irc/core/irc-chatnets.c @@ -43,6 +43,9 @@ static void sig_chatnet_read(IRC_CHATNET_REC *rec, CONFIG_NODE *node) value = config_node_get_str(node, "usermode", NULL); rec->usermode = (value != NULL && *value != '\0') ? g_strdup(value) : NULL; + value = config_node_get_str(node, "alternate_nick", NULL); + rec->alternate_nick = (value != NULL && *value != '\0') ? g_strdup(value) : NULL; + rec->max_cmds_at_once = config_node_get_int(node, "cmdmax", 0); rec->cmd_queue_speed = config_node_get_int(node, "cmdspeed", 0); rec->max_query_chans = config_node_get_int(node, "max_query_chans", 0); @@ -65,6 +68,9 @@ static void sig_chatnet_saved(IRC_CHATNET_REC *rec, CONFIG_NODE *node) if (rec->usermode != NULL) iconfig_node_set_str(node, "usermode", rec->usermode); + if (rec->alternate_nick != NULL) + iconfig_node_set_str(node, "alternate_nick", rec->alternate_nick); + if (rec->max_cmds_at_once > 0) iconfig_node_set_int(node, "cmdmax", rec->max_cmds_at_once); if (rec->cmd_queue_speed > 0) @@ -93,6 +99,7 @@ static void sig_chatnet_destroyed(IRC_CHATNET_REC *rec) { if (IS_IRC_CHATNET(rec)) { g_free(rec->usermode); + g_free(rec->alternate_nick); g_free(rec->sasl_mechanism); g_free(rec->sasl_username); g_free(rec->sasl_password); |