3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00
ergo/irc/types.go

35 lines
472 B
Go
Raw Normal View History

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)
}