Changeset 563 in code for trunk/user.go


Ignore:
Timestamp:
Jun 23, 2021, 5:23:09 PM (4 years ago)
Author:
contact
Message:

Allow admins to broadcast message to all bouncer users

Typically done via:

/notice $<bouncer> <message>

Or, for a connection not bound to a specific network:

/notice $* <message>

The message is broadcast as BouncerServ, because that's the only
user that can be trusted to belong to the bouncer by users. Any
other prefix would conflict with the upstream network.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.go

    r544 r563  
    5252        uc   *upstreamConn
    5353        name string
     54}
     55
     56type eventBroadcast struct {
     57        msg *irc.Message
    5458}
    5559
     
    634638                                dc.Close()
    635639                        }
     640                case eventBroadcast:
     641                        msg := e.msg
     642                        u.forEachDownstream(func(dc *downstreamConn) {
     643                                dc.SendMessage(msg)
     644                        })
    636645                case eventStop:
    637646                        u.forEachDownstream(func(dc *downstreamConn) {
Note: See TracChangeset for help on using the changeset viewer.