mirror of https://github.com/fluffle/goirc
Handle capability invalidation
This commit is contained in:
parent
7e2b14df1f
commit
70cdb2ed2b
|
@ -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…
Reference in New Issue