1
0
Fork 0
forked from External/ergo

restore transition mechanism

This commit is contained in:
Shivaram Lingamneni 2020-07-12 16:31:51 -04:00
parent 6f8711da3b
commit 77184c1625
2 changed files with 12 additions and 0 deletions

View file

@ -430,6 +430,13 @@ func (client *Client) UpdateActive(session *Session) {
session.lastActive = now
}
func (client *Client) Realname() string {
client.stateMutex.RLock()
result := client.realname
client.stateMutex.RUnlock()
return result
}
func (channel *Channel) Name() string {
channel.stateMutex.RLock()
defer channel.stateMutex.RUnlock()