mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Merge remote-tracking branch 'origin/master' into user-mask
Conflicts: irc/reply.go irc/server.go irc/types.go
This commit is contained in:
commit
5d46e7d7fa
7 changed files with 224 additions and 101 deletions
28
irc/types.go
28
irc/types.go
|
|
@ -11,6 +11,30 @@ import (
|
|||
|
||||
type UserMaskSet map[string]bool
|
||||
|
||||
type CapSubCommand string
|
||||
|
||||
type Capability string
|
||||
|
||||
type CapModifier rune
|
||||
|
||||
func (mod CapModifier) String() string {
|
||||
return string(mod)
|
||||
}
|
||||
|
||||
type CapState uint
|
||||
|
||||
type CapabilitySet map[Capability]bool
|
||||
|
||||
func (set CapabilitySet) String() string {
|
||||
strs := make([]string, len(set))
|
||||
index := 0
|
||||
for capability := range set {
|
||||
strs[index] = string(capability)
|
||||
index += 1
|
||||
}
|
||||
return strings.Join(strs, " ")
|
||||
}
|
||||
|
||||
// add, remove, list modes
|
||||
type ModeOp rune
|
||||
|
||||
|
|
@ -22,7 +46,7 @@ func (op ModeOp) String() string {
|
|||
type UserMode rune
|
||||
|
||||
func (mode UserMode) String() string {
|
||||
return fmt.Sprintf("%c", mode)
|
||||
return string(mode)
|
||||
}
|
||||
|
||||
type Phase uint
|
||||
|
|
@ -47,7 +71,7 @@ func (code NumericCode) String() string {
|
|||
type ChannelMode rune
|
||||
|
||||
func (mode ChannelMode) String() string {
|
||||
return fmt.Sprintf("%c", mode)
|
||||
return string(mode)
|
||||
}
|
||||
|
||||
type ChannelNameMap map[string]*Channel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue