- Timestamp:
- Jun 14, 2021, 7:44:38 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/downstream.go
r555 r559 132 132 // require support from all upstreams to be enabled 133 133 var needAllDownstreamCaps = map[string]string{ 134 "account-tag": "", 134 135 "away-notify": "", 135 136 "extended-join": "", … … 376 377 case "time": 377 378 supported = dc.caps["server-time"] 379 case "account": 380 supported = dc.caps["account"] 378 381 } 379 382 if !supported { … … 1951 1954 echoTags := tags.Copy() 1952 1955 echoTags["time"] = irc.TagValue(time.Now().UTC().Format(serverTimeLayout)) 1956 if uc.account != "" { 1957 echoTags["account"] = irc.TagValue(uc.account) 1958 } 1953 1959 echoMsg := &irc.Message{ 1954 1960 Tags: echoTags, -
trunk/upstream.go
r553 r559 22 22 // requested when supported. 23 23 var permanentUpstreamCaps = map[string]bool{ 24 "account-tag": true, 24 25 "away-notify": true, 25 26 "batch": true, … … 95 96 batches map[string]batch 96 97 away bool 98 account string 97 99 nextLabelID uint64 98 100 … … 535 537 }) 536 538 case irc.RPL_LOGGEDIN: 537 var account string 538 if err := parseMessageParams(msg, nil, nil, &account); err != nil { 539 return err 540 } 541 uc.logger.Printf("logged in with account %q", account) 539 if err := parseMessageParams(msg, nil, nil, &uc.account); err != nil { 540 return err 541 } 542 uc.logger.Printf("logged in with account %q", uc.account) 542 543 case irc.RPL_LOGGEDOUT: 544 uc.account = "" 543 545 uc.logger.Printf("logged out") 544 546 case irc.ERR_NICKLOCKED, irc.RPL_SASLSUCCESS, irc.ERR_SASLFAIL, irc.ERR_SASLTOOLONG, irc.ERR_SASLABORTED:
Note:
See TracChangeset
for help on using the changeset viewer.