mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
add client compatibility switches
This commit is contained in:
parent
939729a7c0
commit
fbc6c84a01
6 changed files with 54 additions and 17 deletions
|
|
@ -286,9 +286,14 @@ type Config struct {
|
|||
WebIRC []webircConfig `yaml:"webirc"`
|
||||
MaxSendQString string `yaml:"max-sendq"`
|
||||
MaxSendQBytes int
|
||||
AllowPlaintextResume bool `yaml:"allow-plaintext-resume"`
|
||||
ConnectionLimiter connection_limits.LimiterConfig `yaml:"connection-limits"`
|
||||
ConnectionThrottler connection_limits.ThrottlerConfig `yaml:"connection-throttling"`
|
||||
AllowPlaintextResume bool `yaml:"allow-plaintext-resume"`
|
||||
Compatibility struct {
|
||||
ForceTrailing *bool `yaml:"force-trailing"`
|
||||
forceTrailing bool
|
||||
SendUnprefixedSasl bool `yaml:"send-unprefixed-sasl"`
|
||||
}
|
||||
ConnectionLimiter connection_limits.LimiterConfig `yaml:"connection-limits"`
|
||||
ConnectionThrottler connection_limits.ThrottlerConfig `yaml:"connection-throttling"`
|
||||
}
|
||||
|
||||
Languages struct {
|
||||
|
|
@ -698,6 +703,13 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
config.Channels.Registration.MaxChannelsPerAccount = 15
|
||||
}
|
||||
|
||||
forceTrailingPtr := config.Server.Compatibility.ForceTrailing
|
||||
if forceTrailingPtr != nil {
|
||||
config.Server.Compatibility.forceTrailing = *forceTrailingPtr
|
||||
} else {
|
||||
config.Server.Compatibility.forceTrailing = true
|
||||
}
|
||||
|
||||
// in the current implementation, we disable history by creating a history buffer
|
||||
// with zero capacity. but the `enabled` config option MUST be respected regardless
|
||||
// of this detail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue