Changeset 706 in code for trunk


Ignore:
Timestamp:
Nov 17, 2021, 2:27:34 PM (4 years ago)
Author:
contact
Message:

Update downstream caps/nick/realname before sending MOTD

The MOTD indicates the end of the registration's message burst, and
the server can send arbitrary messages before it.

Update the supported capabilities, the nick and the realname before
MOTD to make it so client logic that runs on MOTD can work with
up-to-date info.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r704 r706  
    11881188        }
    11891189
     1190        dc.updateSupportedCaps()
     1191
    11901192        isupport := []string{
    11911193                fmt.Sprintf("CHATHISTORY=%v", chatHistoryLimit),
     
    12501252        }
    12511253
     1254        dc.updateNick()
     1255        dc.updateRealname()
     1256
    12521257        if motd := dc.user.srv.Config().MOTD; motd != "" && dc.network == nil {
    12531258                for _, msg := range generateMOTD(dc.srv.prefix(), dc.nick, motd) {
     
    12651270                })
    12661271        }
    1267 
    1268         dc.updateNick()
    1269         dc.updateRealname()
    1270         dc.updateSupportedCaps()
    12711272
    12721273        if dc.caps["soju.im/bouncer-networks-notify"] {
Note: See TracChangeset for help on using the changeset viewer.