mirror of
https://github.com/fluffle/goirc
synced 2025-05-15 12:03:21 +00:00
Handle capability invalidation
This commit is contained in:
parent
7e2b14df1f
commit
70cdb2ed2b
1 changed files with 5 additions and 1 deletions
|
@ -110,7 +110,11 @@ func capabilitySet() *capSet {
|
|||
func (c *capSet) Add(caps ...string) {
|
||||
c.mu.Lock()
|
||||
for _, cap := range caps {
|
||||
c.caps[cap] = true
|
||||
if strings.HasPrefix(cap, "-") {
|
||||
c.caps[cap[1:]] = false
|
||||
} else {
|
||||
c.caps[cap] = true
|
||||
}
|
||||
}
|
||||
c.mu.Unlock()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue