Changeset 287 in code for trunk/upstream.go


Ignore:
Timestamp:
May 1, 2020, 5:05:20 PM (5 years ago)
Author:
contact
Message:

Send service NOTICE on highlight in detached channel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r286 r287  
    305305                        }
    306306                        uc.produce(target, msg, nil)
     307
     308                        highlight := strings.Contains(text, uc.nick) && msg.Prefix.Name != uc.nick
     309                        if ch, ok := uc.network.channels[target]; ok && ch.Detached && highlight {
     310                                uc.forEachDownstream(func(dc *downstreamConn) {
     311                                        sendServiceNOTICE(dc, fmt.Sprintf("highlight in %v: <%v> %v", dc.marshalEntity(uc.network, ch.Name), msg.Prefix.Name, text))
     312                                })
     313                        }
    307314                }
    308315        case "CAP":
Note: See TracChangeset for help on using the changeset viewer.