mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 21:39:25 +01:00
fix #702
This commit is contained in:
parent
c4e66d8b83
commit
25c4eb2996
@ -65,12 +65,12 @@ 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()
|
am.buildNickToAccountIndex(server.Config())
|
||||||
am.initVHostRequestQueue()
|
am.initVHostRequestQueue()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (am *AccountManager) buildNickToAccountIndex() {
|
func (am *AccountManager) buildNickToAccountIndex(config *Config) {
|
||||||
if !am.server.AccountConfig().NickReservation.Enabled {
|
if !config.Accounts.NickReservation.Enabled {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ func (server *Server) applyConfig(config *Config, initial bool) (err error) {
|
|||||||
nickReservationPreviouslyDisabled := oldConfig != nil && !oldConfig.Accounts.NickReservation.Enabled
|
nickReservationPreviouslyDisabled := oldConfig != nil && !oldConfig.Accounts.NickReservation.Enabled
|
||||||
nickReservationNowEnabled := config.Accounts.NickReservation.Enabled
|
nickReservationNowEnabled := config.Accounts.NickReservation.Enabled
|
||||||
if nickReservationPreviouslyDisabled && nickReservationNowEnabled {
|
if nickReservationPreviouslyDisabled && nickReservationNowEnabled {
|
||||||
server.accounts.buildNickToAccountIndex()
|
server.accounts.buildNickToAccountIndex(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
hsPreviouslyDisabled := oldConfig != nil && !oldConfig.Accounts.VHosts.Enabled
|
hsPreviouslyDisabled := oldConfig != nil && !oldConfig.Accounts.VHosts.Enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user