diff --git a/irc/channel.go b/irc/channel.go index 4d66ee60..30ab0db5 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -813,16 +813,19 @@ func (channel *Channel) autoReplayHistory(client *Client, rb *ResponseBuffer, sk // autoreplay any messages as necessary var items []history.Item + hasAutoreplayTimestamps := false var start, end time.Time if rb.session.zncPlaybackTimes.ValidFor(channel.NameCasefolded()) { + hasAutoreplayTimestamps = true start, end = rb.session.zncPlaybackTimes.start, rb.session.zncPlaybackTimes.end } else if !rb.session.autoreplayMissedSince.IsZero() { // we already checked for history caps in `playReattachMessages` + hasAutoreplayTimestamps = true start = time.Now().UTC() end = rb.session.autoreplayMissedSince } - if !start.IsZero() || !end.IsZero() { + if hasAutoreplayTimestamps { _, seq, _ := channel.server.GetHistorySequence(channel, client, "") if seq != nil { zncMax := channel.server.Config().History.ZNCMax diff --git a/irc/znc.go b/irc/znc.go index 68e9d9d2..95bd800f 100644 --- a/irc/znc.go +++ b/irc/znc.go @@ -108,6 +108,8 @@ func zncPlaybackPlayHandler(client *Client, command string, params []string, rb now := time.Now().UTC() var start, end time.Time switch len(params) { + case 2: + // #1205: this should have the same semantics as `LATEST *` case 3: // #831: this should have the same semantics as `LATEST timestamp=qux`, // or equivalently `BETWEEN timestamp=$now timestamp=qux`, as opposed to