irc

package
v7.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	FloodProfile string
	// contains filtered or unexported fields
}

func NewIRC

func NewIRC(server, password, nickname, realname string, useTLS, useSasl bool, saslUser, saslPass string,
	logger Logger, floodProfile string) *Connection

func (*Connection) AddCallback

func (irc *Connection) AddCallback(command string, handler func(ircmsg.Message)) ircevent.CallbackID

func (*Connection) AddConnectCallback

func (irc *Connection) AddConnectCallback(handler func(ircmsg.Message)) ircevent.CallbackID

func (*Connection) Connect

func (irc *Connection) Connect() error

func (*Connection) ConnectAndWait

func (irc *Connection) ConnectAndWait() error

func (*Connection) ConnectAndWaitWithRetry

func (irc *Connection) ConnectAndWaitWithRetry(maxRetries int) error

func (*Connection) CurrentNick

func (irc *Connection) CurrentNick() string

func (*Connection) Join

func (irc *Connection) Join(channel string) error

func (*Connection) NewRateLimiter

func (irc *Connection) NewRateLimiter(floodProfile string) *RateLimiter

func (*Connection) Part

func (irc *Connection) Part(channel string) error

func (*Connection) Quit

func (irc *Connection) Quit()

func (*Connection) RemoveCallback

func (irc *Connection) RemoveCallback(id ircevent.CallbackID)

func (*Connection) SendRaw

func (irc *Connection) SendRaw(line string) error

func (*Connection) SendRawf

func (irc *Connection) SendRawf(formatLine string, args ...interface{}) error

func (*Connection) Wait

func (irc *Connection) Wait()

type Logger

type Logger interface {
	// Debugf uses fmt.Sprintf to log a templated message with an debug priority
	Debugf(template string, args ...interface{})
	// Infof uses fmt.Sprintf to log a templated message with an info priority
	Infof(template string, args ...interface{})
	// Warnf uses fmt.Sprintf to log a templated message with an warning priority
	Warnf(template string, args ...interface{})
	// Errorf uses fmt.Sprintf to log a templated message with an error priority
	Errorf(template string, args ...interface{})
	// Panicf uses fmt.Sprintf to log a templated message with an error priority
	Panicf(template string, args ...interface{})
	// Fatalf uses fmt.Sprintf to log a templated message with a fatal priority and then exit the application
	Fatalf(template string, args ...interface{})
}

Logger interface for loosely typed printf-style formatted error logging messages

type RateLimiter

type RateLimiter struct {
	// contains filtered or unexported fields
}

func (*RateLimiter) Init

func (r *RateLimiter) Init(profile string)

func (*RateLimiter) Wait

func (r *RateLimiter) Wait() error

Jump to

Keyboard shortcuts

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