1
0
Fork 0
forked from External/ergo

more channel mode parsing and bad listing

This commit is contained in:
Jeremy Latt 2014-02-08 22:06:10 -08:00
parent d370abcd4c
commit 93f4b6859a
7 changed files with 205 additions and 65 deletions

34
irc/types.go Normal file
View 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)
}