irc

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package irc implements a gateway.NotificationAdapter for IRC channels using the ergochat/irc-go library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements gateway.NotificationAdapter for IRC.

func New

func New(name string, cfg Config) *Adapter

New creates an IRC adapter with the given config.

func (*Adapter) Channels

func (a *Adapter) Channels() []gateway.ChannelInfo

Channels returns the configured IRC channels.

func (*Adapter) HTTPHandler

func (a *Adapter) HTTPHandler() http.Handler

func (*Adapter) Name

func (a *Adapter) Name() string

func (*Adapter) Start

func (a *Adapter) Start(ctx context.Context, handler func(gateway.Notification)) error

Start connects to IRC and joins configured channels. Blocks until ctx done.

func (*Adapter) Status

func (a *Adapter) Status() gateway.AdapterStatus

Status returns the connection state.

func (*Adapter) Stop

func (a *Adapter) Stop() error

Stop disconnects from IRC.

func (*Adapter) Type

func (a *Adapter) Type() gateway.AdapterType

type Config

type Config struct {
	Server   string   // e.g. "irc.libera.chat:6697"
	Nick     string   // bot nickname
	Channels []string // channels to join (e.g. ["#bc", "#dev"])
	UseTLS   bool
	Password string // optional server password
}

Config holds IRC connection parameters.

Jump to

Keyboard shortcuts

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