forked from External/ergo
fix CAP messages
This commit is contained in:
parent
f56db354ee
commit
33df043961
4 changed files with 26 additions and 16 deletions
14
irc/types.go
14
irc/types.go
|
|
@ -14,6 +14,10 @@ type CapSubCommand string
|
|||
|
||||
type Capability string
|
||||
|
||||
func (capability Capability) String() string {
|
||||
return string(capability)
|
||||
}
|
||||
|
||||
type CapModifier rune
|
||||
|
||||
func (mod CapModifier) String() string {
|
||||
|
|
@ -34,6 +38,16 @@ func (set CapabilitySet) String() string {
|
|||
return strings.Join(strs, " ")
|
||||
}
|
||||
|
||||
func (set CapabilitySet) DisableString() string {
|
||||
parts := make([]string, len(set))
|
||||
index := 0
|
||||
for capability := range set {
|
||||
parts[index] = Disable.String() + capability.String()
|
||||
index += 1
|
||||
}
|
||||
return strings.Join(parts, " ")
|
||||
}
|
||||
|
||||
// a string with wildcards
|
||||
type Mask string
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue