1
0
Fork 0
forked from External/ergo

load isupport directly into the config object

eliminates Server.configurableStateMutex
This commit is contained in:
Shivaram Lingamneni 2019-05-10 00:27:28 -04:00
parent 61d666a25b
commit ce6a3e42df
5 changed files with 49 additions and 58 deletions

View file

@ -8,7 +8,6 @@ import (
"time"
"unsafe"
"github.com/oragono/oragono/irc/isupport"
"github.com/oragono/oragono/irc/languages"
"github.com/oragono/oragono/irc/modes"
)
@ -21,12 +20,6 @@ func (server *Server) SetConfig(config *Config) {
atomic.StorePointer(&server.config, unsafe.Pointer(config))
}
func (server *Server) ISupport() *isupport.List {
server.configurableStateMutex.RLock()
defer server.configurableStateMutex.RUnlock()
return server.isupport
}
func (server *Server) Limits() Limits {
return server.Config().Limits
}