3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-26 12:42:50 +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.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
}

View File

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