|
@@ -673,6 +673,7 @@ func (server *Server) applyConfig(config *Config, initial bool) (err error) {
|
673
|
673
|
server.logger.Debug("server", "STS Vals", stsCurrentCapValue, stsValue, fmt.Sprintf("server[%v] config[%v]", stsPreviouslyEnabled, config.Server.STS.Enabled))
|
674
|
674
|
if (config.Server.STS.Enabled != stsPreviouslyEnabled) || (stsValue != stsCurrentCapValue) {
|
675
|
675
|
// XXX: STS is always removed by CAP NEW sts=duration=0, not CAP DEL
|
|
676
|
+ // so the appropriate notify is always a CAP NEW; put it in addedCaps for any change
|
676
|
677
|
addedCaps.Add(caps.STS)
|
677
|
678
|
}
|
678
|
679
|
|
|
@@ -704,17 +705,17 @@ func (server *Server) applyConfig(config *Config, initial bool) (err error) {
|
704
|
705
|
|
705
|
706
|
// updated caps get DEL'd and then NEW'd
|
706
|
707
|
// so, we can just add updated ones to both removed and added lists here and they'll be correctly handled
|
707
|
|
- server.logger.Debug("server", "Updated Caps", strings.Join(updatedCaps.String(caps.Cap301, config.Server.capValues), " "))
|
|
708
|
+ server.logger.Debug("server", "Updated Caps", strings.Join(updatedCaps.Strings(caps.Cap301, config.Server.capValues), " "))
|
708
|
709
|
addedCaps.Union(updatedCaps)
|
709
|
710
|
removedCaps.Union(updatedCaps)
|
710
|
711
|
|
711
|
712
|
if !addedCaps.Empty() || !removedCaps.Empty() {
|
712
|
713
|
capBurstSessions = server.clients.AllWithCapsNotify()
|
713
|
714
|
|
714
|
|
- added[caps.Cap301] = addedCaps.String(caps.Cap301, config.Server.capValues)
|
715
|
|
- added[caps.Cap302] = addedCaps.String(caps.Cap302, config.Server.capValues)
|
|
715
|
+ added[caps.Cap301] = addedCaps.Strings(caps.Cap301, config.Server.capValues)
|
|
716
|
+ added[caps.Cap302] = addedCaps.Strings(caps.Cap302, config.Server.capValues)
|
716
|
717
|
// removed never has values, so we leave it as Cap301
|
717
|
|
- removed = removedCaps.String(caps.Cap301, config.Server.capValues)
|
|
718
|
+ removed = removedCaps.Strings(caps.Cap301, config.Server.capValues)
|
718
|
719
|
}
|
719
|
720
|
|
720
|
721
|
for _, sSession := range capBurstSessions {
|