Changeset 296 in code for trunk/upstream.go


Ignore:
Timestamp:
May 27, 2020, 9:42:38 PM (5 years ago)
Author:
delthas
Message:

Update downstream nicks in single-server mode and after NICK

Previously, the downstream nick was never changed, even when the
downstream sent a NICK message or was in single-server mode with a
different nick.

This adds support for updating the downstream nick in the following
cases:

  • when a downstream sends NICK
  • additionally, in single-server mode:
    • when a downstream connects and its single network is connected
    • when an upstream connects
    • when an upstream sends NICK
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r295 r296  
    657657                                dc.SendMessage(dc.marshalMessage(msg, uc.network))
    658658                        })
     659                } else {
     660                        uc.forEachDownstream(func(dc *downstreamConn) {
     661                                dc.updateNick()
     662                        })
    659663                }
    660664        case "JOIN":
Note: See TracChangeset for help on using the changeset viewer.