ircutil

package
v0.0.0-...-8261f08 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2014 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParseMsg   = errors.New("Unable to parse message")
	ErrInvalidMsg = errors.New("Message contains invalid characters")
)

Errors

View Source
var (
	// Valid message. Make sure it contains no newline chars
	// or the like that could allow for irc injection
	ValidMsg = regexp.MustCompile(`^(.)+$`)
)

Some regular expressions

Functions

This section is empty.

Types

type ClientConn

type ClientConn struct {
	Dial      func(network, addr string) (net.Conn, error)
	TlsConfig *tls.Config
	Conn      *irc.Conn

	Address  string
	Password string
	Timeout  time.Duration

	Nick       string
	UserName   string
	RealName   string
	OpPassword string
}

func (*ClientConn) Close

func (cc *ClientConn) Close() error

func (*ClientConn) Connect

func (cc *ClientConn) Connect(h *Handlers) (err error)

func (*ClientConn) Disconnect

func (cc *ClientConn) Disconnect() error

func (*ClientConn) Join

func (cc *ClientConn) Join(channels string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.2.1

func (*ClientConn) Mode

func (cc *ClientConn) Mode(target, mode string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.2.3

func (*ClientConn) Notice

func (cc *ClientConn) Notice(target, message string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.4.1

func (*ClientConn) Part

func (cc *ClientConn) Part(channel string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.2.2

func (*ClientConn) Ping

func (cc *ClientConn) Ping(message string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.6.2

func (*ClientConn) PingPong

func (cc *ClientConn) PingPong(m *irc.Message) error

func (*ClientConn) Pong

func (cc *ClientConn) Pong(message string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.6.3

func (*ClientConn) PrivMsg

func (cc *ClientConn) PrivMsg(target, message string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.4.1

func (*ClientConn) Quit

func (cc *ClientConn) Quit() error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.1.6

func (*ClientConn) QuitM

func (cc *ClientConn) QuitM(message string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.1.6

func (*ClientConn) RegisterClient

func (cc *ClientConn) RegisterClient() (err error)

func (*ClientConn) RunHandlers

func (cc *ClientConn) RunHandlers(h *Handlers) (err error)

func (*ClientConn) SendRaw

func (cc *ClientConn) SendRaw(message string) (err error)

func (*ClientConn) SetNick

func (cc *ClientConn) SetNick(nick string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.1.2

func (*ClientConn) SetOper

func (cc *ClientConn) SetOper() error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.1.5

func (*ClientConn) SetPassword

func (cc *ClientConn) SetPassword() error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.1.1

func (*ClientConn) SetUser

func (cc *ClientConn) SetUser() error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.1.3

func (*ClientConn) Topic

func (cc *ClientConn) Topic(target, topic string) error

RFC 1459 details: tools.ietf.org/html/rfc1459#section-4.2.4

type Handlers

type Handlers struct {
	ClientConnected func() error
	RPLWelcome      func(*irc.Message) error
	PingPong        func(*irc.Message) error
	Join            func(*irc.Message) error
	PrivMsg         func(*irc.Message) error
	UnknownCMD      func(*irc.Message) error
}

Jump to

Keyboard shortcuts

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