Changeset 563 in code for trunk/downstream.go
- Timestamp:
- Jun 23, 2021, 5:23:09 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/downstream.go
r562 r563 1914 1914 1915 1915 for _, name := range strings.Split(targetsStr, ",") { 1916 if name == "$"+dc.srv.Hostname || (name == "$*" && dc.network == nil) { 1917 // "$" means a server mask follows. If it's the bouncer's 1918 // hostname, broadcast the message to all bouncer users. 1919 if !dc.user.Admin { 1920 return ircError{&irc.Message{ 1921 Prefix: dc.srv.prefix(), 1922 Command: irc.ERR_BADMASK, 1923 Params: []string{dc.nick, name, "Permission denied to broadcast message to all bouncer users"}, 1924 }} 1925 } 1926 1927 dc.logger.Printf("broadcasting bouncer-wide %v: %v", msg.Command, text) 1928 1929 broadcastTags := tags.Copy() 1930 broadcastTags["time"] = irc.TagValue(time.Now().UTC().Format(serverTimeLayout)) 1931 broadcastMsg := &irc.Message{ 1932 Tags: broadcastTags, 1933 Prefix: servicePrefix, 1934 Command: msg.Command, 1935 Params: []string{name, text}, 1936 } 1937 dc.srv.forEachUser(func(u *user) { 1938 u.events <- eventBroadcast{broadcastMsg} 1939 }) 1940 continue 1941 } 1942 1916 1943 if dc.network == nil && casemapASCII(name) == dc.nickCM { 1917 1944 dc.SendMessage(msg)
Note:
See TracChangeset
for help on using the changeset viewer.