Documentation ¶
Index ¶
- Variables
- type Client
- func (c Client) Command(command string, params ...string) error
- func (c Client) Join(channels ...string) error
- func (c Client) JoinLockedChannel(channel, password string) error
- func (c Client) Nick(name string) error
- func (c Client) Pass(password string) error
- func (c Client) SendMessage(m Message) (err error)
- type Message
- type MessageDecoder
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMsgTooLong = errors.New("irc: message longer than 510 characters")
View Source
var ErrMsgTooShort = errors.New("irc: message too short")
View Source
var ErrParamsTooLong = errors.New("irc: more than 15 parameters")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
io.ReadWriteCloser
}
func NewClient ¶
func NewClient(r io.ReadWriteCloser) (c Client)
func (Client) JoinLockedChannel ¶
func (Client) SendMessage ¶
type Message ¶
Message represents a single IRC message, such as this:
:prefix command parameter1 param2 param3
func (Message) MarshalText ¶
func (*Message) UnmarshalText ¶
UnmarshalText parses the IRC message into the Message struct.
type MessageDecoder ¶
type MessageDecoder struct {
// contains filtered or unexported fields
}
func NewMessageDecoder ¶
func NewMessageDecoder(r io.Reader) (m MessageDecoder)
func (MessageDecoder) Decode ¶
func (d MessageDecoder) Decode() (m Message, err error)
Click to show internal directories.
Click to hide internal directories.