1
0
Fork 0
forked from External/ergo

load motd directly into the config object

This commit is contained in:
Shivaram Lingamneni 2019-05-10 00:07:22 -04:00
parent fbc6c84a01
commit 61d666a25b
2 changed files with 10 additions and 19 deletions

View file

@ -280,6 +280,7 @@ type Config struct {
STS STSConfig
CheckIdent bool `yaml:"check-ident"`
MOTD string
motdLines []string
MOTDFormatting bool `yaml:"motd-formatting"`
ProxyAllowedFrom []string `yaml:"proxy-allowed-from"`
proxyAllowedFromNets []net.IPNet
@ -710,6 +711,8 @@ func LoadConfig(filename string) (config *Config, err error) {
config.Server.Compatibility.forceTrailing = true
}
config.loadMOTD()
// 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