forked from External/ergo
commit
a46c0eed9f
16 changed files with 821 additions and 108 deletions
|
|
@ -13,6 +13,7 @@ import (
|
|||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
|
@ -511,6 +512,7 @@ type Config struct {
|
|||
supportedCaps *caps.Set
|
||||
capValues caps.Values
|
||||
Casemapping Casemapping
|
||||
OutputPath string `yaml:"output-path"`
|
||||
}
|
||||
|
||||
Roleplay struct {
|
||||
|
|
@ -590,6 +592,10 @@ type Config struct {
|
|||
RegisteredChannels PersistentStatus `yaml:"registered-channels"`
|
||||
DirectMessages PersistentStatus `yaml:"direct-messages"`
|
||||
}
|
||||
Retention struct {
|
||||
AllowIndividualDelete bool `yaml:"allow-individual-delete"`
|
||||
EnableAccountIndexing bool `yaml:"enable-account-indexing"`
|
||||
}
|
||||
}
|
||||
|
||||
Filename string
|
||||
|
|
@ -1111,6 +1117,7 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
config.Roleplay.addSuffix = utils.BoolDefaultTrue(config.Roleplay.AddSuffix)
|
||||
|
||||
config.Datastore.MySQL.ExpireTime = time.Duration(config.History.Restrictions.ExpireTime)
|
||||
config.Datastore.MySQL.TrackAccountMessages = config.History.Retention.EnableAccountIndexing
|
||||
|
||||
config.Server.Cloaks.Initialize()
|
||||
if config.Server.Cloaks.Enabled {
|
||||
|
|
@ -1133,6 +1140,10 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
return config, nil
|
||||
}
|
||||
|
||||
func (config *Config) getOutputPath(filename string) string {
|
||||
return filepath.Join(config.Server.OutputPath, filename)
|
||||
}
|
||||
|
||||
// setISupport sets up our RPL_ISUPPORT reply.
|
||||
func (config *Config) generateISupport() (err error) {
|
||||
maxTargetsString := strconv.Itoa(maxTargets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue