mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 13:29:27 +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.server = server
|
||||
|
||||
am.buildNickToAccountIndex()
|
||||
am.buildNickToAccountIndex(server.Config())
|
||||
am.initVHostRequestQueue()
|
||||
}
|
||||
|
||||
func (am *AccountManager) buildNickToAccountIndex() {
|
||||
if !am.server.AccountConfig().NickReservation.Enabled {
|
||||
func (am *AccountManager) buildNickToAccountIndex(config *Config) {
|
||||
if !config.Accounts.NickReservation.Enabled {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -658,7 +658,7 @@ func (server *Server) applyConfig(config *Config, initial bool) (err error) {
|
||||
nickReservationPreviouslyDisabled := oldConfig != nil && !oldConfig.Accounts.NickReservation.Enabled
|
||||
nickReservationNowEnabled := config.Accounts.NickReservation.Enabled
|
||||
if nickReservationPreviouslyDisabled && nickReservationNowEnabled {
|
||||
server.accounts.buildNickToAccountIndex()
|
||||
server.accounts.buildNickToAccountIndex(config)
|
||||
}
|
||||
|
||||
hsPreviouslyDisabled := oldConfig != nil && !oldConfig.Accounts.VHosts.Enabled
|
||||
|
Loading…
Reference in New Issue
Block a user