summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/irc-chatnets.c17
-rw-r--r--src/irc/core/irc-core.c3
-rw-r--r--src/irc/core/irc-servers.c3
-rw-r--r--src/irc/core/irc-servers.h4
4 files changed, 14 insertions, 13 deletions
diff --git a/src/irc/core/irc-chatnets.c b/src/irc/core/irc-chatnets.c
index 4eda9401..0ccf121c 100644
--- a/src/irc/core/irc-chatnets.c
+++ b/src/irc/core/irc-chatnets.c
@@ -53,10 +53,10 @@ static void ircnet_save(IRC_CHATNET_REC *rec)
{
CONFIG_NODE *node;
- g_return_if_fail(IS_IRC_CHATNET(rec));
+ g_return_if_fail(rec != NULL);
node = iconfig_node_traverse("ircnets", TRUE);
- node = chatnet_save(CHATNET(rec), node);
+ node = chatnet_save((CHATNET_REC *) rec, node);
if (rec->max_cmds_at_once > 0)
config_node_set_int(node, "cmdmax", rec->max_cmds_at_once);
@@ -90,16 +90,21 @@ void ircnet_create(IRC_CHATNET_REC *rec)
rec->chat_type = IRC_PROTOCOL;
ircnet_save(rec);
- chatnet_create(CHATNET(rec));
+ chatnet_create((CHATNET_REC *) rec);
}
static void read_ircnets(void)
{
CONFIG_NODE *node;
- GSList *tmp;
+ GSList *tmp, *next;
- while (chatnets != NULL)
- chatnet_destroy(chatnets->data);
+ 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);
diff --git a/src/irc/core/irc-core.c b/src/irc/core/irc-core.c
index a6ff310a..657696ef 100644
--- a/src/irc/core/irc-core.c
+++ b/src/irc/core/irc-core.c
@@ -22,6 +22,7 @@
#include "chat-protocols.h"
#include "irc-servers.h"
+#include "irc-chatnets.h"
#include "irc-channels.h"
#include "irc-queries.h"
@@ -52,6 +53,7 @@ void irc_core_init(void)
{
chat_protocol_register("IRC", "Internet Relay Chat", "ircnet");
+ irc_chatnets_init();
irc_servers_init();
irc_channels_init();
irc_queries_init();
@@ -84,6 +86,7 @@ void irc_core_deinit(void)
irc_channels_deinit();
irc_irc_deinit();
irc_servers_deinit();
+ irc_chatnets_deinit();
chat_protocol_unregister("IRC");
}
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c
index d51f2af5..be6bd809 100644
--- a/src/irc/core/irc-servers.c
+++ b/src/irc/core/irc-servers.c
@@ -31,7 +31,6 @@
#include "queries.h"
#include "irc.h"
-#include "irc-chatnets.h"
#include "irc-servers-setup.h"
#include "irc-servers.h"
#include "server-idle.h"
@@ -396,7 +395,6 @@ void irc_servers_init(void)
signal_add("event empty", (SIGNAL_FUNC) event_empty);
irc_servers_setup_init();
- irc_chatnets_init();
irc_servers_reconnect_init();
servers_idle_init();
}
@@ -422,7 +420,6 @@ void irc_servers_deinit(void)
signal_remove("event empty", (SIGNAL_FUNC) event_empty);
irc_servers_setup_deinit();
- irc_chatnets_deinit();
irc_servers_reconnect_deinit();
servers_idle_deinit();
}
diff --git a/src/irc/core/irc-servers.h b/src/irc/core/irc-servers.h
index 1541693f..0b66f27c 100644
--- a/src/irc/core/irc-servers.h
+++ b/src/irc/core/irc-servers.h
@@ -78,10 +78,6 @@ typedef struct {
GHashTable *splits; /* For keeping track of netsplits */
GSList *split_servers; /* Servers that are currently in split */
- time_t lag_sent; /* 0 or time when last lag query was sent to server */
- time_t lag_last_check; /* last time we checked lag */
- int lag; /* server lag in milliseconds */
-
GSList *rejoin_channels; /* try to join to these channels after a while -
channels go here if they're "temporarily unavailable"
because of netsplits */