irc

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 10 Imported by: 2

Documentation

Overview

Package irc is used to manage a client IRC connection as a squircy3 plugin.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotConnected = errors.New("not connected")

Functions

func Initialize

func Initialize(m *plugin.Manager) (plugin.Plugin, error)

Initialize is a plugin.Initializer that initializes an irc plugin.

Types

type Config

type Config struct {
	Nick     string `toml:"nick"`
	Username string `toml:"user"`

	Network     string `toml:"network"`
	TLS         bool   `toml:"tls"`
	AutoConnect bool   `toml:"auto"`

	SASL         bool   `toml:"sasl"`
	SASLUsername string `toml:"sasl_username"`
	SASLPassword string `toml:"sasl_password"`

	ServerPassword string `toml:"server_password"`

	Version string
}

type Connection

type Connection struct {
	*irc.Connection
	// contains filtered or unexported fields
}

func (*Connection) Connect

func (conn *Connection) Connect() error

func (*Connection) Quit

func (conn *Connection) Quit() (err error)

type Manager

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

func FromPlugins

func FromPlugins(m *plugin.Manager) (*Manager, error)

FromPlugins returns the irc plugin's Manager or an error if it fails.

func NewManager

func NewManager(c *Config, ev *event.Dispatcher) *Manager

func (*Manager) Connect

func (m *Manager) Connect() error

func (*Manager) Disconnect

func (m *Manager) Disconnect() error

func (*Manager) Do

func (m *Manager) Do(fn func(*Connection) error) error

func (*Manager) SetVersionString

func (m *Manager) SetVersionString(v string)

Jump to

Keyboard shortcuts

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