Ejemplo n.º 1
0
static void read_chatnets(void)
{
	CONFIG_NODE *node;
        GSList *tmp;

	while (chatnets != NULL)
                chatnet_destroy(chatnets->data);

	node = iconfig_node_traverse("chatnets", FALSE);
	if (node != NULL) {
		tmp = config_node_first(node->value);
		for (; tmp != NULL; tmp = config_node_next(tmp))
                        chatnet_read(tmp->data);
	}
}
Ejemplo n.º 2
0
static void ircnet_read(CONFIG_NODE *node)
{
	IRC_CHATNET_REC *rec;

	if (node == NULL || node->key == NULL)
		return;

	rec = g_new0(IRC_CHATNET_REC, 1);
	rec->chat_type = IRC_PROTOCOL;

	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_kicks = config_node_get_int(node, "max_kicks", 0);
	rec->max_msgs = config_node_get_int(node, "max_msgs", 0);
	rec->max_modes = config_node_get_int(node, "max_modes", 0);
	rec->max_whois = config_node_get_int(node, "max_whois", 0);

	chatnet_read((CHATNET_REC *) rec, node);
}