mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
load motd directly into the config object
This commit is contained in:
parent
fbc6c84a01
commit
61d666a25b
2 changed files with 10 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue