summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-19 16:28:11 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-19 16:28:11 +0100
commit1b3539a50d29a8956aa0bd2e668681e8afb968c0 (patch)
treec390d76bf35c948625e8d63e53aa04f54ae1b2ad /blabouncer.c
parent58db24681d7b27faed5340c2195119f0d7c7a97f (diff)
Announce the start and end of log replay. Also ensure log replay lines finish with CRLF when writing.
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c7
1 files changed, 7 insertions, 0 deletions
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;
}