mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Abort Irssi on wrong entries in the channels or servers config
This commit is contained in:
parent
ae5e2fe5e5
commit
16b1d58703
3 changed files with 42 additions and 9 deletions
|
|
@ -625,9 +625,18 @@ static void read_servers(void)
|
|||
/* Read servers */
|
||||
node = iconfig_node_traverse("servers", FALSE);
|
||||
if (node != NULL) {
|
||||
int i = 0;
|
||||
tmp = config_node_first(node->value);
|
||||
for (; tmp != NULL; tmp = config_node_next(tmp))
|
||||
server_setup_read(tmp->data);
|
||||
for (; tmp != NULL; tmp = config_node_next(tmp), i++) {
|
||||
node = tmp->data;
|
||||
if (node->type != NODE_TYPE_BLOCK) {
|
||||
g_critical("Expected block node at `servers[%d]' was of %s type. "
|
||||
"Corrupt config?",
|
||||
i, node->type == NODE_TYPE_LIST ? "list" : "scalar");
|
||||
} else {
|
||||
server_setup_read(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue