forked from External/ergo
more channel mode parsing and bad listing
This commit is contained in:
parent
d370abcd4c
commit
93f4b6859a
7 changed files with 205 additions and 65 deletions
34
irc/types.go
Normal file
34
irc/types.go
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
package irc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// simple types
|
||||
|
||||
type ModeOp rune
|
||||
type UserMode rune
|
||||
type ChannelMode rune
|
||||
type UserChannelMode rune
|
||||
type Mask string
|
||||
|
||||
// interfaces
|
||||
|
||||
type Command interface {
|
||||
Client() *Client
|
||||
Source() Identifier
|
||||
Reply(Reply)
|
||||
HandleServer(*Server)
|
||||
}
|
||||
|
||||
// structs
|
||||
|
||||
type UserMask struct {
|
||||
nickname Mask
|
||||
username Mask
|
||||
hostname Mask
|
||||
}
|
||||
|
||||
func (mask *UserMask) String() string {
|
||||
return fmt.Sprintf("%s!%s@%s", mask.nickname, mask.username, mask.hostname)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue