1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

properly ignore empty lines and comments in servers and channels config

fixes #1242
This commit is contained in:
Ailin Nemui 2020-12-31 17:50:40 +01:00
parent f57dcfe90d
commit ae5e2fe5e5
2 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,10 @@ static int compare_channel_setup (CONFIG_NODE *node, CHANNEL_SETUP_REC *channel)
{
char *name, *chatnet;
/* skip comment nodes */
if (node->type == NODE_TYPE_COMMENT)
return -1;
name = config_node_get_str(node, "name", NULL);
chatnet = config_node_get_str(node, "chatnet", NULL);

View File

@ -472,6 +472,10 @@ static int compare_server_setup (CONFIG_NODE *node, SERVER_SETUP_REC *server)
char *address, *chatnet;
int port;
/* skip comment nodes */
if (node->type == NODE_TYPE_COMMENT)
return -1;
address = config_node_get_str(node, "address", NULL);
chatnet = config_node_get_str(node, "chatnet", NULL);
port = config_node_get_int(node, "port", 0);