3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 21:39:25 +01:00
This commit is contained in:
Shivaram Lingamneni 2019-12-21 20:19:19 -05:00
parent c4e66d8b83
commit 25c4eb2996
2 changed files with 4 additions and 4 deletions

View File

@ -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
} }

View File

@ -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