Changeset 152 in code for trunk/upstream.go
- Timestamp:
- Mar 25, 2020, 10:15:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/upstream.go
r146 r152 50 50 channels map[string]*upstreamChannel 51 51 caps map[string]string 52 53 tagsSupported bool 52 54 53 55 saslClient sasl.Client … … 191 193 } 192 194 195 requestCaps := make([]string, 0, 16) 196 for _, c := range []string{"message-tags"} { 197 if _, ok := uc.caps[c]; ok { 198 requestCaps = append(requestCaps, c) 199 } 200 } 201 193 202 if uc.requestSASL() { 203 requestCaps = append(requestCaps, "sasl") 204 } 205 206 if len(requestCaps) > 0 { 194 207 uc.SendMessage(&irc.Message{ 195 208 Command: "CAP", 196 Params: []string{"REQ", "sasl"}, 197 }) 209 Params: []string{"REQ", strings.Join(requestCaps, " ")}, 210 }) 211 } 212 213 if uc.requestSASL() { 198 214 break // we'll send CAP END after authentication is completed 199 215 } … … 892 908 }) 893 909 }) 910 case "TAGMSG": 911 // TODO: relay to downstream connections that accept message-tags 894 912 case irc.RPL_YOURHOST, irc.RPL_CREATED: 895 913 // Ignore … … 988 1006 Params: []string{auth.Mechanism}, 989 1007 }) 1008 case "message-tags": 1009 uc.tagsSupported = ok 990 1010 } 991 1011 return nil
Note:
See TracChangeset
for help on using the changeset viewer.