1
0
Fork 0
forked from External/ergo

limit the number of channels a client can join

This commit is contained in:
Shivaram Lingamneni 2019-02-06 04:55:05 -05:00
parent ff7bbc4a9c
commit eff2571096
4 changed files with 22 additions and 3 deletions

View file

@ -184,6 +184,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
}