From 511e258e901e5248e1706609ba1099507fd750ae Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Tue, 11 Jun 2019 22:54:50 +0100 Subject: Implement configurable auto replay modes. So far there is "none", "time" (auto replay the last X seconds), and "lastspoke" (auto replay everything since you last spoke). --- message.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'message.c') diff --git a/message.c b/message.c index e8879b2..97d15c8 100644 --- a/message.c +++ b/message.c @@ -126,7 +126,7 @@ int processservermessage(SSL *server_ssl, char *str, struct client *clients, int for (int i = 0; i < MAXCLIENTS; i++) { if (clients[i].fd) { char alertmsg[MAXDATASIZE]; - if (!doreplay(clients[i].fd, settings->replayseconds, clients, settings, ircdstate, channels)) { + if (!doautoreplay(clients[i].fd, clients, settings, ircdstate, channels)) { snprintf(alertmsg, MAXDATASIZE, "NOTICE %s :Unable to read replay log file!", ircdstate->ircnick); sendtoclient(sourcefd, alertmsg, clients, settings, 0); } @@ -947,7 +947,7 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int clients[arrindex(clients, sourcefd)].registered = 1; // Catch the client up with the default number of seconds of replay - if (!doreplay(sourcefd, settings->replayseconds, clients, settings, ircdstate, channels)) { + if (!doautoreplay(sourcefd, clients, settings, ircdstate, channels)) { snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Unable to read replay log file!", ircdstate->ircnick); sendtoclient(sourcefd, outgoingmsg, clients, settings, 0); } -- cgit v1.2.3