diff options
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/netsplit.c | 7 | ||||
-rw-r--r-- | src/irc/core/netsplit.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/irc/core/netsplit.c b/src/irc/core/netsplit.c index e6bb199c..34c478cf 100644 --- a/src/irc/core/netsplit.c +++ b/src/irc/core/netsplit.c @@ -49,14 +49,19 @@ static NETSPLIT_SERVER_REC *netsplit_server_create(IRC_SERVER_REC *server, const NETSPLIT_SERVER_REC *rec; rec = netsplit_server_find(server, servername, destserver); - if (rec != NULL) return rec; + if (rec != NULL) { + rec->last = time(NULL); + return rec; + } rec = g_new0(NETSPLIT_SERVER_REC, 1); + rec->last = time(NULL); rec->server = g_strdup(servername); rec->destserver = g_strdup(destserver); server->split_servers = g_slist_append(server->split_servers, rec); signal_emit("netsplit new server", 2, server, rec); + return rec; } diff --git a/src/irc/core/netsplit.h b/src/irc/core/netsplit.h index c95b5c6f..6ea9cf3f 100644 --- a/src/irc/core/netsplit.h +++ b/src/irc/core/netsplit.h @@ -7,6 +7,8 @@ typedef struct { char *server; char *destserver; int count; + + time_t last; /* last time we received a QUIT msg here */ } NETSPLIT_SERVER_REC; typedef struct { @@ -16,6 +18,7 @@ typedef struct { char *address; GSList *channels; + int printed:1; time_t destroy; } NETSPLIT_REC; |