event

package
v0.0.0-...-df918ef Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: ISC Imports: 4 Imported by: 1

Documentation

Overview

Package event contains an event manager interface, and various implementations thereof

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFunc

type CallbackFunc func(*Message) error

CallbackFunc is a base name for a function that could be used as a callback. implementations of MessageHandler dont have to use this internally, but some of the base ones do so its helpful.

type Message

type Message struct {
	Raw           *ircmsg.Message
	SourceUser    *user.EphemeralUser
	CurrentNick   string
	AvailableCaps []capab.Capability
}

Message represents an incoming IRC message and associated metadata

type MessageHandler

type MessageHandler interface {
	OnMessage(message *Message) error
}

MessageHandler represents anything that can deal with an IRC message

type MultiError

type MultiError struct {
	Errors []error
}

MultiError contains multiple errors all of which occurred during an OnMessage call.

func (*MultiError) Error

func (m *MultiError) Error() string

Directories

Path Synopsis
Package chatcommand implements event.Handler for PRIVMSG based IRC commands.
Package chatcommand implements event.Handler for PRIVMSG based IRC commands.
Package chatmessage provides a simple frontend for message handlers
Package chatmessage provides a simple frontend for message handlers
Package function provides an implementation of event.Handler based around a single function
Package function provides an implementation of event.Handler based around a single function
Package irccommand provides an event.Handler implementation scoped to IRC commands
Package irccommand provides an event.Handler implementation scoped to IRC commands
Package multi provides an event.Handler implementation that calls other event.Handler implementations
Package multi provides an event.Handler implementation that calls other event.Handler implementations
Package raw provides an event.Handler implementation that intercepts all incoming IRC messages
Package raw provides an event.Handler implementation that intercepts all incoming IRC messages
Package servernotice implements event.Handler for IRC server notices (not regular NOTICEs)
Package servernotice implements event.Handler for IRC server notices (not regular NOTICEs)

Jump to

Keyboard shortcuts

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