irc

package
v0.0.0-...-efa4d4d Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotCommand = errors.New("not a command")

Functions

func HandleMessages

func HandleMessages(ctx context.Context, c *irc.Connection, e *irc.Event)

HandleMessages is the function that intercepts channel (or private) messages and handles them

func InitBot

func InitBot(ctx context.Context) error

func RequestReply

func RequestReply(c *irc.Connection, eventcode, command string) (string, error)

RequestReply abstracts sending a command to the IRC server and listening for a reply. Eventcodes must match the commands. See https://www.alien.net.au/irc/irc2numerics.html

func SendReply

func SendReply(c *irc.Connection, ch string, msg string, action bool)

Types

type Command

type Command struct {
	Command  string
	Argument string
}

func ParseCommand

func ParseCommand(ctx context.Context, msg string) (cmd Command, err error)

Jump to

Keyboard shortcuts

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