Changeset 563 in code for trunk/server.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/server.go

    r531 r563  
    125125}
    126126
     127func (s *Server) forEachUser(f func(*user)) {
     128        s.lock.Lock()
     129        for _, u := range s.users {
     130                f(u)
     131        }
     132        s.lock.Unlock()
     133}
     134
    127135func (s *Server) getUser(name string) *user {
    128136        s.lock.Lock()
Note: See TracChangeset for help on using the changeset viewer.