Changeset 226 in code for trunk/upstream.go


Ignore:
Timestamp:
Apr 6, 2020, 3:28:49 PM (5 years ago)
Author:
contact
Message:

Introduce upstreamConn.produce

The logic in this function is about to get more complicated. It'll soon
also dispatch messages in connected downstreams.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r221 r226  
    248248        case "NOTICE":
    249249                if msg.Prefix.User == "" && msg.Prefix.Host == "" { // server message
    250                         uc.network.ring.Produce(msg)
     250                        uc.produce(msg)
    251251                } else { // regular user NOTICE
    252252                        var entity, text string
     
    261261                        uc.appendLog(target, msg)
    262262
    263                         uc.network.ring.Produce(msg)
     263                        uc.produce(msg)
    264264                }
    265265        case "CAP":
     
    11361136                uc.appendLog(target, msg)
    11371137
    1138                 uc.network.ring.Produce(msg)
     1138                uc.produce(msg)
    11391139        case "INVITE":
    11401140                var nick string
     
    13641364}
    13651365
     1366func (uc *upstreamConn) produce(msg *irc.Message) {
     1367        uc.network.ring.Produce(msg)
     1368}
     1369
    13661370func (uc *upstreamConn) updateAway() {
    13671371        away := true
Note: See TracChangeset for help on using the changeset viewer.