mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-31 11:13:05 -07:00
load motd directly into the config object
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user