irc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIncorrectType = errors.New("config is not of type: 'irc'")

Functions

This section is empty.

Types

type BotParser added in v0.5.0

type BotParser struct {
}

func (*BotParser) Parse added in v0.5.0

func (c *BotParser) Parse(val map[string]any) (seras.Bot, error)

type Config

type Config struct {
	Server       string
	Nick         string
	Username     string
	Channels     []string
	SASL         bool
	SASLUsername string
	SASLPassword string
	seras.BaseConnection
}

func ParseConfig added in v0.5.0

func ParseConfig(val map[string]any) (Config, error)

type Connection

type Connection struct {
	Config
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(conf Config) (*Connection, error)

func (*Connection) AddMods added in v0.5.0

func (con *Connection) AddMods(mods []seras.Module)

func (*Connection) Bold added in v0.5.0

func (con *Connection) Bold(msg string) string

func (*Connection) Close

func (con *Connection) Close() error

func (*Connection) Connect

func (con *Connection) Connect() (seras.Stream, error)

func (*Connection) IsAdmin added in v0.5.0

func (con *Connection) IsAdmin(userId string) bool

func (*Connection) Italicize added in v0.5.0

func (con *Connection) Italicize(msg string) string

func (*Connection) ModList added in v0.5.0

func (con *Connection) ModList() map[string]interface{}

func (*Connection) Modules added in v0.5.0

func (con *Connection) Modules() []seras.Module

func (*Connection) Reply added in v0.5.0

func (con *Connection) Reply(msg seras.Message, content string) error

func (*Connection) Send added in v0.5.0

func (con *Connection) Send(msg seras.Message) error

func (*Connection) TimeoutUser added in v0.5.0

func (con *Connection) TimeoutUser(channel string, user string, until time.Time) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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