summaryrefslogtreecommitdiff
path: root/message.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2022-11-24 00:08:34 +0000
committerLuke Bratch <luke@bratch.co.uk>2022-11-24 00:08:34 +0000
commit2e665e03b6175b3f31f0ef1e058183417df1456e (patch)
tree32674c99ac25a3df5c166db89260c60e15764c10 /message.c
parent680d8535a87be8aa0d5ef6432d1f87561ebfcb5f (diff)
Fix replaymode = "lastspoke" by using line numbers rather than time to calculate replay start point.
Introduce new function doreplaylastspoke() to achieve this, move doreplay() into replay.c as doreplaytime() and refactor common things into sanitisereplay().
Diffstat (limited to 'message.c')
-rw-r--r--message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/message.c b/message.c
index 9c07a83..c205709 100644
--- a/message.c
+++ b/message.c
@@ -1370,7 +1370,7 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
debugprint(DEBUG_FULL, "Replaying '%s' which is '%d' seconds.\n", tokens[2], replayseconds);
- if (!doreplay(sourcefd, replayseconds, clients, settings, ircdstate, channels)) {
+ if (!doreplaytime(sourcefd, replayseconds, clients, settings, ircdstate, channels)) {
snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Unable to read replay log file!", ircdstate->ircnick);
sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
}
@@ -1448,7 +1448,7 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
return 1;
}
- if (!doreplay(sourcefd, time(NULL) - codetime, clients, settings, ircdstate, channels)) {
+ if (!doreplaytime(sourcefd, time(NULL) - codetime, clients, settings, ircdstate, channels)) {
snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Unable to read replay log file!", ircdstate->ircnick);
sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
return 1;