1
0
Fork 0
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:
Shivaram Lingamneni 2019-01-01 23:45:47 -05:00
parent f94f737b31
commit 9a2117f75d
3 changed files with 4 additions and 17 deletions

View file

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