Minor features for parity with murmur.ini

MaxUsers: modifies existing sessionpool similar to Murmur
MaxUsersPerChannel: already implemented, inconsistent name
AllowPing: affects registration, too
DefaultChannel
RememberChannel
ServerPassword
SendOSInfo: already implemented, inconsistent name

Config keys are renamed to conform to murmur.ini
This commit is contained in:
rubenseyer 2018-02-14 20:50:09 +01:00
parent 693dd6f4e8
commit ae41a612ba
12 changed files with 241 additions and 109 deletions

View file

@ -37,16 +37,16 @@ func (c *ConfigFile) ServerConfig(id int64, persistentMap map[string]string) *Co
// Some server specific values from the global config must be offset.
// These are read differently by the server as well.
if v, ok := m["Port"]; ok {
if v, ok := m["port"]; ok {
i, err := strconv.ParseInt(v, 10, 64)
if err == nil {
m["Port"] = strconv.FormatInt(i+id-1, 10)
m["port"] = strconv.FormatInt(i+id-1, 10)
}
}
if v, ok := m["WebPort"]; ok {
if v, ok := m["webport"]; ok {
i, err := strconv.ParseInt(v, 10, 64)
if err == nil {
m["WebPort"] = strconv.FormatInt(i+id-1, 10)
m["webport"] = strconv.FormatInt(i+id-1, 10)
}
}