Changeset 73 in code for trunk/upstream.go
- Timestamp:
- Mar 4, 2020, 2:44:13 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/upstream.go
r72 r73 101 101 } 102 102 103 func (uc *upstreamConn) forEachDownstream(f func(*downstreamConn)) { 104 uc.user.forEachDownstream(func(dc *downstreamConn) { 105 if dc.upstream != nil && dc.upstream != uc.upstream { 106 return 107 } 108 f(dc) 109 }) 110 } 111 103 112 func (uc *upstreamConn) getChannel(name string) (*upstreamChannel, error) { 104 113 ch, ok := uc.channels[name] … … 141 150 } 142 151 143 uc. user.forEachDownstream(func(dc *downstreamConn) {152 uc.forEachDownstream(func(dc *downstreamConn) { 144 153 dc.SendMessage(&irc.Message{ 145 154 Prefix: dc.marshalUserPrefix(uc, msg.Prefix), … … 211 220 } 212 221 213 uc. user.forEachDownstream(func(dc *downstreamConn) {222 uc.forEachDownstream(func(dc *downstreamConn) { 214 223 dc.SendMessage(&irc.Message{ 215 224 Prefix: dc.marshalUserPrefix(uc, msg.Prefix), … … 241 250 } 242 251 243 uc. user.forEachDownstream(func(dc *downstreamConn) {252 uc.forEachDownstream(func(dc *downstreamConn) { 244 253 dc.SendMessage(&irc.Message{ 245 254 Prefix: dc.marshalUserPrefix(uc, msg.Prefix), … … 327 336 ch.complete = true 328 337 329 uc. user.forEachDownstream(func(dc *downstreamConn) {338 uc.forEachDownstream(func(dc *downstreamConn) { 330 339 forwardChannel(dc, ch) 331 340 })
Note:
See TracChangeset
for help on using the changeset viewer.