Esempio n. 1
0
void chatnet_remove(CHATNET_REC *chatnet)
{
	g_return_if_fail(IS_CHATNET(chatnet));

	signal_emit("chatnet removed", 1, chatnet);
	chatnet_destroy(chatnet);
}
Esempio n. 2
0
void chatnets_deinit(void)
{
	while (chatnets != NULL)
		chatnet_destroy(chatnets->data);

	signal_remove("event connected", (SIGNAL_FUNC) sig_connected);
	module_uniq_destroy("CHATNET");
}
Esempio n. 3
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);
	}
}
Esempio n. 4
0
static void read_ircnets(void)
{
	CONFIG_NODE *node;
	GSList *tmp, *next;

	for (tmp = chatnets; tmp != NULL; tmp = next) {
		CHATNET_REC *rec = tmp->data;

		next = tmp->next;
		if (IS_IRCNET(rec))
			chatnet_destroy(rec);
	}

	/* read ircnets */
	node = iconfig_node_traverse("ircnets", FALSE);
	if (node != NULL) {
		for (tmp = node->value; tmp != NULL; tmp = tmp->next)
			ircnet_read(tmp->data);
	}
}