Merge pull request #352 from slingamn/chanreglimit.1

track channel registrations per account
This commit is contained in:
Daniel Oaks 2019-02-18 07:08:57 +10:00 committed by GitHub
commit 7cf8aaccf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 154 additions and 14 deletions

View file

@ -200,6 +200,12 @@ func (client *Client) Channels() (result []*Channel) {
return
}
func (client *Client) NumChannels() int {
client.stateMutex.RLock()
defer client.stateMutex.RUnlock()
return len(client.channels)
}
func (client *Client) WhoWas() (result WhoWas) {
return client.Details().WhoWas
}