From 555a2bf929e6a76609fc06f97de47a731d511f95 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 25 May 2000 16:40:25 +0000 Subject: Print nicks who quit IRC in netsplit message. See netsplit section in docs/manual.txt for more information. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@241 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/netsplit.c | 7 ++++++- src/irc/core/netsplit.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/irc/core') 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; -- cgit v1.2.3