mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
implement #199
This commit is contained in:
parent
0ea210c28c
commit
be86684e96
7 changed files with 79 additions and 30 deletions
|
|
@ -142,6 +142,30 @@ func (client *Client) SetAccountName(account string) (changed bool) {
|
|||
return
|
||||
}
|
||||
|
||||
func (client *Client) Authorized() bool {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
return client.authorized
|
||||
}
|
||||
|
||||
func (client *Client) SetAuthorized(authorized bool) {
|
||||
client.stateMutex.Lock()
|
||||
defer client.stateMutex.Unlock()
|
||||
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.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue