forked from External/ergo
preregNick doesn't need synchronization
(since it's only accessed from the client's own goroutine)
This commit is contained in:
parent
f94f737b31
commit
9a2117f75d
3 changed files with 4 additions and 17 deletions
|
|
@ -179,18 +179,6 @@ func (client *Client) SetAuthorized(authorized bool) {
|
|||
client.authorized = authorized
|
||||
}
|
||||
|
||||
func (client *Client) PreregNick() string {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
return client.preregNick
|
||||
}
|
||||
|
||||
func (client *Client) SetPreregNick(preregNick string) {
|
||||
client.stateMutex.Lock()
|
||||
defer client.stateMutex.Unlock()
|
||||
client.preregNick = preregNick
|
||||
}
|
||||
|
||||
func (client *Client) HasMode(mode modes.Mode) bool {
|
||||
// client.flags has its own synch
|
||||
return client.flags.HasMode(mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue