From 1b3539a50d29a8956aa0bd2e668681e8afb968c0 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 19 May 2019 16:28:11 +0100 Subject: Announce the start and end of log replay. Also ensure log replay lines finish with CRLF when writing. --- blabouncer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'blabouncer.c') diff --git a/blabouncer.c b/blabouncer.c index f250959..0d17468 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -449,6 +449,10 @@ int doreplay(int sourcefd, int replayseconds, struct client *clients, struct set return 1; } + // Announce the start + snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Starting log replay....", ircdstrings->ircnick); + sendtoclient(sourcefd, outgoingmsg, clients, settings); + // Replay those lines! for (int i = 0; i < numlines; i++) { if (!readreplayline(replayseconds, i, outgoingmsg, settings->basedir)) { @@ -459,6 +463,9 @@ int doreplay(int sourcefd, int replayseconds, struct client *clients, struct set sendtoclient(sourcefd, outgoingmsg, clients, settings); } + // Announce the end + snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Log replay complete.", ircdstrings->ircnick); + return 1; } -- cgit v1.2.3