mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Support cap-notify and enabling/disabling SASL
This commit is contained in:
parent
1f2cfbee6f
commit
b84dbb1a06
7 changed files with 88 additions and 17 deletions
|
|
@ -82,6 +82,24 @@ func (clients *ClientLookupSet) Remove(client *Client) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (clients *ClientLookupSet) AllWithCaps(caps ...Capability) (set ClientSet) {
|
||||
set = make(ClientSet)
|
||||
|
||||
var client *Client
|
||||
for _, client = range clients.ByNick {
|
||||
// make sure they have all the required caps
|
||||
for _, Cap := range caps {
|
||||
if !client.capabilities[Cap] {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
set.Add(client)
|
||||
}
|
||||
|
||||
return set
|
||||
}
|
||||
|
||||
func (clients *ClientLookupSet) FindAll(userhost string) (set ClientSet) {
|
||||
set = make(ClientSet)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue