client

package
v0.0.0-...-cff22fa Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IrcMaxBytes = 512

Functions

This section is empty.

Types

type Client

type Client struct {
	Cfg config.Config

	Plugins []Plugin
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg config.Config) *Client

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) Handle001

func (c *Client) Handle001(lgroups map[string]string)

func (*Client) HandlePing

func (c *Client) HandlePing(lgroups map[string]string)

func (*Client) HandlePrivmsg

func (c *Client) HandlePrivmsg(lgroups map[string]string)

func (*Client) MainLoop

func (c *Client) MainLoop() error

func (*Client) PrintRaw

func (c *Client) PrintRaw(cmd string)

func (*Client) PrintfPrivmsg

func (c *Client) PrintfPrivmsg(target string, format string, args ...any)

func (*Client) RegisterLineHandler

func (c *Client) RegisterLineHandler(pattern string, fn LineHandler)

func (*Client) RegisterPlugin

func (c *Client) RegisterPlugin(p Plugin)

type LineHandler

type LineHandler func(lgroups map[string]string)

type Plugin

type Plugin struct {
	Pattern *regexp.Regexp
	Handler PluginHandler
	Name    string
	Desc    string
	Usage   string
	Example string
}

type PluginHandler

type PluginHandler func(c *Client, lgroups, bgroups map[string]string)

Jump to

Keyboard shortcuts

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