forked from External/ergo
channel history modifications
This commit is contained in:
parent
f4c03b6765
commit
711af30aa8
5 changed files with 106 additions and 41 deletions
|
|
@ -971,7 +971,7 @@ func (channel *Channel) autoReplayHistory(client *Client, rb *ResponseBuffer, sk
|
|||
}
|
||||
}
|
||||
if 0 < numItems {
|
||||
channel.replayHistoryItems(rb, items, false)
|
||||
channel.replayHistoryItems(rb, items, false, "", "", numItems)
|
||||
rb.Flush(true)
|
||||
}
|
||||
}
|
||||
|
|
@ -1062,7 +1062,7 @@ func (channel *Channel) Part(client *Client, message string, rb *ResponseBuffer)
|
|||
client.server.logger.Debug("channels", fmt.Sprintf("%s left channel %s", details.nick, chname))
|
||||
}
|
||||
|
||||
func (channel *Channel) replayHistoryItems(rb *ResponseBuffer, items []history.Item, chathistoryCommand bool) {
|
||||
func (channel *Channel) replayHistoryItems(rb *ResponseBuffer, items []history.Item, chathistoryCommand bool, identifier string, preposition string, limit int) {
|
||||
// send an empty batch if necessary, as per the CHATHISTORY spec
|
||||
chname := channel.Name()
|
||||
client := rb.target
|
||||
|
|
@ -1082,7 +1082,7 @@ func (channel *Channel) replayHistoryItems(rb *ResponseBuffer, items []history.I
|
|||
}
|
||||
}
|
||||
|
||||
batchID := rb.StartNestedBatch("chathistory", chname)
|
||||
batchID := rb.StartNestedBatch("chathistory", chname, identifier, preposition, strconv.Itoa(limit))
|
||||
defer rb.EndNestedBatch(batchID)
|
||||
|
||||
for _, item := range items {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue