1
0
Fork 0
forked from External/ergo

Merge pull request #396 from slingamn/issue394

fix #394
This commit is contained in:
Daniel Oaks 2019-02-18 10:24:35 +10:00 committed by GitHub
commit 09909e3b3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 20 deletions

View file

@ -143,6 +143,19 @@ func (client *Client) SetRegistered() {
client.stateMutex.Unlock()
}
func (client *Client) AwayMessage() (result string) {
client.stateMutex.RLock()
result = client.awayMessage
client.stateMutex.RUnlock()
return
}
func (client *Client) SetAwayMessage(message string) {
client.stateMutex.Lock()
client.awayMessage = message
client.stateMutex.Unlock()
}
func (client *Client) Destroyed() bool {
client.stateMutex.RLock()
defer client.stateMutex.RUnlock()