plugins

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: BSD-1-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package plugins defines and maintains supported bot plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(w irc.ResponseWriter, r *irc.Request)

Dispatch sends the given, incoming IRC message to all plugins.

func Load

func Load(prof irc.Profile)

Load initializes all plugins.

func Register

func Register(p Plugin)

Register registers the given plugin. This is meant to be called during program initialization, by imported plugin packages.

func Unload

func Unload(prof irc.Profile)

Unload unloads all plugins.

Types

type Plugin

type Plugin interface {
	// Load initializes the module and loads any internal resources
	// which may be required.
	Load(irc.Profile) error

	// Unload cleans the module up and unloads any internal resources.
	Unload(irc.Profile) error

	// Dispatch sends the given, incoming IRC message to the plugin for
	// processing as it sees fit.
	Dispatch(irc.ResponseWriter, *irc.Request)
}

Plugin defines the interface for a single plugin.

Directories

Path Synopsis
Package action binds action commands.
Package action binds action commands.
Package admin defines administrative bot commands.
Package admin defines administrative bot commands.
Package knmi provides commands to do current weather lookups.
Package knmi provides commands to do current weather lookups.
Package owm provides commands to do current weather lookups.
Package owm provides commands to do current weather lookups.
Package reminder allows a user to schedule a reminder with a custom message.
Package reminder allows a user to schedule a reminder with a custom message.
url
Package url defines a plugin, which finds and extracts URLs from incoming chat data.
Package url defines a plugin, which finds and extracts URLs from incoming chat data.
youtube
Package youtube provides a minimal set of bindings for Youtube's Data API v3.
Package youtube provides a minimal set of bindings for Youtube's Data API v3.

Jump to

Keyboard shortcuts

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