1
0
Fork 0
forked from External/ergo

rename 'bouncer' to 'multiclient'

This commit is contained in:
Shivaram Lingamneni 2020-02-20 23:55:42 -05:00
parent 03378da81b
commit f5ca35ed72
9 changed files with 53 additions and 68 deletions

View file

@ -77,7 +77,7 @@ func (am *AccountManager) Initialize(server *Server) {
}
func (am *AccountManager) createAlwaysOnClients(config *Config) {
if config.Accounts.Bouncer.AlwaysOn == PersistentDisabled {
if config.Accounts.Multiclient.AlwaysOn == PersistentDisabled {
return
}
@ -103,7 +103,7 @@ func (am *AccountManager) createAlwaysOnClients(config *Config) {
for _, accountName := range accounts {
account, err := am.LoadAccount(accountName)
if err == nil && account.Verified &&
persistenceEnabled(config.Accounts.Bouncer.AlwaysOn, account.Settings.AlwaysOn) {
persistenceEnabled(config.Accounts.Multiclient.AlwaysOn, account.Settings.AlwaysOn) {
am.server.AddAlwaysOnClient(account, am.loadChannels(accountName), am.loadLastSignoff(accountName))
}
}
@ -1676,12 +1676,12 @@ func (ac *AccountCredentials) RemoveCertfp(certfp string) (err error) {
return nil
}
type BouncerAllowedSetting int
type MulticlientAllowedSetting int
const (
BouncerAllowedServerDefault BouncerAllowedSetting = iota
BouncerDisallowedByUser
BouncerAllowedByUser
MulticlientAllowedServerDefault MulticlientAllowedSetting = iota
MulticlientDisallowedByUser
MulticlientAllowedByUser
)
// controls whether/when clients without event-playback support see fake
@ -1708,10 +1708,12 @@ func replayJoinsSettingFromString(str string) (result ReplayJoinsSetting, err er
return
}
// XXX: AllowBouncer cannot be renamed AllowMulticlient because it is stored in
// persistent JSON blobs in the database
type AccountSettings struct {
AutoreplayLines *int
NickEnforcement NickEnforcementMethod
AllowBouncer BouncerAllowedSetting
AllowBouncer MulticlientAllowedSetting
ReplayJoins ReplayJoinsSetting
AlwaysOn PersistentStatus
AutoreplayMissed bool