forked from External/ergo
increase max cap line length
Workaround for #661: this makes the `CAP LS 302` line from the default config fit on a single line, as long as the server name is at most 35 characters.
This commit is contained in:
parent
a75d26a46b
commit
ae9aecbbb0
4 changed files with 20 additions and 12 deletions
|
|
@ -710,17 +710,17 @@ func (server *Server) applyConfig(config *Config, initial bool) (err error) {
|
|||
|
||||
// updated caps get DEL'd and then NEW'd
|
||||
// so, we can just add updated ones to both removed and added lists here and they'll be correctly handled
|
||||
server.logger.Debug("server", "Updated Caps", strings.Join(updatedCaps.Strings(caps.Cap301, config.Server.capValues), " "))
|
||||
server.logger.Debug("server", "Updated Caps", strings.Join(updatedCaps.Strings(caps.Cap301, config.Server.capValues, 0), " "))
|
||||
addedCaps.Union(updatedCaps)
|
||||
removedCaps.Union(updatedCaps)
|
||||
|
||||
if !addedCaps.Empty() || !removedCaps.Empty() {
|
||||
capBurstSessions = server.clients.AllWithCapsNotify()
|
||||
|
||||
added[caps.Cap301] = addedCaps.Strings(caps.Cap301, config.Server.capValues)
|
||||
added[caps.Cap302] = addedCaps.Strings(caps.Cap302, config.Server.capValues)
|
||||
added[caps.Cap301] = addedCaps.Strings(caps.Cap301, config.Server.capValues, 0)
|
||||
added[caps.Cap302] = addedCaps.Strings(caps.Cap302, config.Server.capValues, 0)
|
||||
// removed never has values, so we leave it as Cap301
|
||||
removed = removedCaps.Strings(caps.Cap301, config.Server.capValues)
|
||||
removed = removedCaps.Strings(caps.Cap301, config.Server.capValues, 0)
|
||||
}
|
||||
|
||||
for _, sSession := range capBurstSessions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue