mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-29 21:52:05 -07:00
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:
+4
-4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user