mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-01 16:39:26 +01:00
fix the analogous issue for vhosts
This commit is contained in:
parent
25c4eb2996
commit
26ca016c66
@ -65,8 +65,9 @@ func (am *AccountManager) Initialize(server *Server) {
|
|||||||
am.accountToMethod = make(map[string]NickEnforcementMethod)
|
am.accountToMethod = make(map[string]NickEnforcementMethod)
|
||||||
am.server = server
|
am.server = server
|
||||||
|
|
||||||
am.buildNickToAccountIndex(server.Config())
|
config := server.Config()
|
||||||
am.initVHostRequestQueue()
|
am.buildNickToAccountIndex(config)
|
||||||
|
am.initVHostRequestQueue(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (am *AccountManager) buildNickToAccountIndex(config *Config) {
|
func (am *AccountManager) buildNickToAccountIndex(config *Config) {
|
||||||
@ -135,8 +136,8 @@ func (am *AccountManager) buildNickToAccountIndex(config *Config) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (am *AccountManager) initVHostRequestQueue() {
|
func (am *AccountManager) initVHostRequestQueue(config *Config) {
|
||||||
if !am.server.AccountConfig().VHosts.Enabled {
|
if !config.Accounts.VHosts.Enabled {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,7 +664,7 @@ func (server *Server) applyConfig(config *Config, initial bool) (err error) {
|
|||||||
hsPreviouslyDisabled := oldConfig != nil && !oldConfig.Accounts.VHosts.Enabled
|
hsPreviouslyDisabled := oldConfig != nil && !oldConfig.Accounts.VHosts.Enabled
|
||||||
hsNowEnabled := config.Accounts.VHosts.Enabled
|
hsNowEnabled := config.Accounts.VHosts.Enabled
|
||||||
if hsPreviouslyDisabled && hsNowEnabled {
|
if hsPreviouslyDisabled && hsNowEnabled {
|
||||||
server.accounts.initVHostRequestQueue()
|
server.accounts.initVHostRequestQueue(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
chanRegPreviouslyDisabled := oldConfig != nil && !oldConfig.Channels.Registration.Enabled
|
chanRegPreviouslyDisabled := oldConfig != nil && !oldConfig.Channels.Registration.Enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user