mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix #1615
Remove the CHATHISTORY * and znc.in/playback *self targets, clean up associated database code, add new mechanisms to play all missed DMs.
This commit is contained in:
parent
d2278faf75
commit
0d05ab4ff4
6 changed files with 87 additions and 64 deletions
|
|
@ -9,7 +9,6 @@ import (
|
|||
"os"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/oragono/oragono/irc/history"
|
||||
|
|
@ -71,7 +70,7 @@ the request of the account holder.`,
|
|||
help: `Syntax: $bPLAY <target> [limit]$b
|
||||
|
||||
PLAY plays back history messages, rendering them into direct messages from
|
||||
HistServ. 'target' is a channel name (or 'me' for direct messages), and 'limit'
|
||||
HistServ. 'target' is a channel name or nickname to query, and 'limit'
|
||||
is a message count or a time duration. Note that message playback may be
|
||||
incomplete or degraded, relative to direct playback from /HISTORY or
|
||||
CHATHISTORY.`,
|
||||
|
|
@ -206,11 +205,7 @@ func histservPlayHandler(service *ircService, server *Server, client *Client, co
|
|||
|
||||
// handles parameter parsing and history queries for /HISTORY and /HISTSERV PLAY
|
||||
func easySelectHistory(server *Server, client *Client, params []string) (items []history.Item, channel *Channel, err error) {
|
||||
target := params[0]
|
||||
if strings.ToLower(target) == "me" {
|
||||
target = "*"
|
||||
}
|
||||
channel, sequence, err := server.GetHistorySequence(nil, client, target)
|
||||
channel, sequence, err := server.GetHistorySequence(nil, client, params[0])
|
||||
|
||||
if sequence == nil || err != nil {
|
||||
return nil, nil, errNoSuchChannel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue