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:
parent
f57dcfe90d
commit
ae5e2fe5e5
@ -34,6 +34,10 @@ static int compare_channel_setup (CONFIG_NODE *node, CHANNEL_SETUP_REC *channel)
|
|||||||
{
|
{
|
||||||
char *name, *chatnet;
|
char *name, *chatnet;
|
||||||
|
|
||||||
|
/* skip comment nodes */
|
||||||
|
if (node->type == NODE_TYPE_COMMENT)
|
||||||
|
return -1;
|
||||||
|
|
||||||
name = config_node_get_str(node, "name", NULL);
|
name = config_node_get_str(node, "name", NULL);
|
||||||
chatnet = config_node_get_str(node, "chatnet", NULL);
|
chatnet = config_node_get_str(node, "chatnet", NULL);
|
||||||
|
|
||||||
|
@ -472,6 +472,10 @@ static int compare_server_setup (CONFIG_NODE *node, SERVER_SETUP_REC *server)
|
|||||||
char *address, *chatnet;
|
char *address, *chatnet;
|
||||||
int port;
|
int port;
|
||||||
|
|
||||||
|
/* skip comment nodes */
|
||||||
|
if (node->type == NODE_TYPE_COMMENT)
|
||||||
|
return -1;
|
||||||
|
|
||||||
address = config_node_get_str(node, "address", NULL);
|
address = config_node_get_str(node, "address", NULL);
|
||||||
chatnet = config_node_get_str(node, "chatnet", NULL);
|
chatnet = config_node_get_str(node, "chatnet", NULL);
|
||||||
port = config_node_get_int(node, "port", 0);
|
port = config_node_get_int(node, "port", 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user