Changeset 723 in code for trunk/downstream.go


Ignore:
Timestamp:
Nov 21, 2021, 10:00:57 AM (4 years ago)
Author:
contact
Message:

Send RPL_LOGGEDIN with bouncer account in multi-upstream mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r722 r723  
    10391039
    10401040func (dc *downstreamConn) updateAccount() {
    1041         uc := dc.upstream()
    1042         if uc == nil || uc.account == dc.account || !dc.caps["sasl"] {
     1041        var account string
     1042        if dc.network == nil {
     1043                account = dc.user.Username
     1044        } else if uc := dc.upstream(); uc != nil {
     1045                account = uc.account
     1046        } else {
    10431047                return
    10441048        }
    10451049
    1046         if uc.account != "" {
     1050        if dc.account == account || !dc.caps["sasl"] {
     1051                return
     1052        }
     1053
     1054        if account != "" {
    10471055                dc.SendMessage(&irc.Message{
    10481056                        Prefix:  dc.srv.prefix(),
    10491057                        Command: irc.RPL_LOGGEDIN,
    1050                         Params:  []string{dc.nick, dc.prefix().String(), uc.account, "You are logged in as " + uc.account},
     1058                        Params:  []string{dc.nick, dc.prefix().String(), account, "You are logged in as " + account},
    10511059                })
    10521060        } else {
     
    10581066        }
    10591067
    1060         dc.account = uc.account
     1068        dc.account = account
    10611069}
    10621070
Note: See TracChangeset for help on using the changeset viewer.