2017-10-02 10:42:50 +02:00
|
|
|
// Copyright (c) 2017 Shivaram Lingamneni <slingamn@cs.stanford.edu>
|
|
|
|
// released under the MIT license
|
|
|
|
|
|
|
|
package irc
|
|
|
|
|
2017-10-05 15:39:57 +02:00
|
|
|
import "github.com/oragono/oragono/irc/isupport"
|
|
|
|
|
|
|
|
func (server *Server) getISupport() *isupport.List {
|
2017-10-02 10:42:50 +02:00
|
|
|
server.configurableStateMutex.RLock()
|
|
|
|
defer server.configurableStateMutex.RUnlock()
|
|
|
|
return server.isupport
|
|
|
|
}
|
|
|
|
|
|
|
|
func (server *Server) getLimits() Limits {
|
|
|
|
server.configurableStateMutex.RLock()
|
|
|
|
defer server.configurableStateMutex.RUnlock()
|
|
|
|
return server.limits
|
|
|
|
}
|
|
|
|
|
|
|
|
func (server *Server) getPassword() []byte {
|
|
|
|
server.configurableStateMutex.RLock()
|
|
|
|
defer server.configurableStateMutex.RUnlock()
|
|
|
|
return server.password
|
|
|
|
}
|
2017-10-04 06:57:03 +02:00
|
|
|
|
|
|
|
func (client *Client) getNick() string {
|
|
|
|
client.stateMutex.RLock()
|
|
|
|
defer client.stateMutex.RUnlock()
|
|
|
|
return client.nick
|
|
|
|
}
|
|
|
|
|
|
|
|
func (client *Client) getNickMaskString() string {
|
|
|
|
client.stateMutex.RLock()
|
|
|
|
defer client.stateMutex.RUnlock()
|
|
|
|
return client.nickMaskString
|
|
|
|
}
|
|
|
|
|
|
|
|
func (client *Client) getNickCasefolded() string {
|
|
|
|
client.stateMutex.RLock()
|
|
|
|
defer client.stateMutex.RUnlock()
|
|
|
|
return client.nickCasefolded
|
|
|
|
}
|
2017-10-15 18:24:28 +02:00
|
|
|
|
|
|
|
func (client *Client) Registered() bool {
|
|
|
|
client.stateMutex.RLock()
|
|
|
|
defer client.stateMutex.RUnlock()
|
|
|
|
return client.registered
|
|
|
|
}
|
|
|
|
|
|
|
|
func (client *Client) Destroyed() bool {
|
|
|
|
client.stateMutex.RLock()
|
|
|
|
defer client.stateMutex.RUnlock()
|
|
|
|
return client.isDestroyed
|
|
|
|
}
|