Merge pull request #218 from slingamn/socketwriter.1

refactor irc.Socket
This commit is contained in:
Shivaram Lingamneni 2018-03-28 13:26:03 -04:00 committed by GitHub
commit 7cfa75a59e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 90 additions and 125 deletions

View file

@ -6,8 +6,17 @@ package irc
import (
"github.com/oragono/oragono/irc/isupport"
"github.com/oragono/oragono/irc/modes"
"sync/atomic"
)
func (server *Server) MaxSendQBytes() int {
return int(atomic.LoadUint32(&server.maxSendQBytes))
}
func (server *Server) SetMaxSendQBytes(m int) {
atomic.StoreUint32(&server.maxSendQBytes, uint32(m))
}
func (server *Server) ISupport() *isupport.List {
server.configurableStateMutex.RLock()
defer server.configurableStateMutex.RUnlock()