irc

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug = log.New(ioutil.Discard, "IRC: ", log.LstdFlags)
)

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Topic   string
	Members []*Member
	Mode    string
}

type Conn

type Conn struct {
	Messages     chan *Message
	PrivMessages chan *PrivMsg
	// contains filtered or unexported fields
}

func New

func New(server string, port uint16, nick string, realName string) *Conn

func (*Conn) Connect

func (c *Conn) Connect() error

func (*Conn) Join

func (c *Conn) Join(channel string, key string)

func (*Conn) JoinExclusive

func (c *Conn) JoinExclusive(channel string, key string)

func (*Conn) Listen

func (c *Conn) Listen()

func (*Conn) Part

func (c *Conn) Part(channel string, partMessage string)

func (*Conn) PrivMsg

func (c *Conn) PrivMsg(target string, text string)

func (*Conn) Quit

func (c *Conn) Quit(quitMessage string)

type Member

type Member struct {
	User  string
	Nick  string
	Oper  bool
	Voice bool
}

type Message

type Message struct {
	Origin     string
	Command    string
	ReplyCode  int
	Parameters string
}

func NewMessage

func NewMessage(raw string) (*Message, error)

type PrivMsg

type PrivMsg struct {
	User    string
	Nick    string
	Channel string
	Text    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL