Changeset 670 in code for trunk/downstream.go


Ignore:
Timestamp:
Nov 3, 2021, 5:29:21 PM (4 years ago)
Author:
contact
Message:

Turn CHATHISTORY and backlog limits into constants

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r667 r670  
    11621162
    11631163        isupport := []string{
    1164                 fmt.Sprintf("CHATHISTORY=%v", dc.srv.HistoryLimit),
     1164                fmt.Sprintf("CHATHISTORY=%v", chatHistoryLimit),
    11651165                "CASEMAPPING=ascii",
    11661166        }
     
    13321332        defer cancel()
    13331333
    1334         limit := 4000
    13351334        targetCM := net.casemap(target)
    1336         history, err := dc.user.msgStore.LoadLatestID(ctx, &net.Network, targetCM, msgID, limit)
     1335        history, err := dc.user.msgStore.LoadLatestID(ctx, &net.Network, targetCM, msgID, backlogLimit)
    13371336        if err != nil {
    13381337                dc.logger.Printf("failed to send backlog for %q: %v", target, err)
     
    23292328
    23302329                limit, err := strconv.Atoi(limitStr)
    2331                 if err != nil || limit < 0 || limit > dc.srv.HistoryLimit {
     2330                if err != nil || limit < 0 || limit > chatHistoryLimit {
    23322331                        return ircError{&irc.Message{
    23332332                                Command: "FAIL",
Note: See TracChangeset for help on using the changeset viewer.