plugin

package
v0.0.0-...-d6e6fda Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2013 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatePreInit = iota
	StatePostInit
	StatePostTeardown
)

Variables

This section is empty.

Functions

func AllowedPrivmsgTextLength

func AllowedPrivmsgTextLength(dst string) int

AllowedPrivmsgTextLength returns the amount of text that can be safely given to a Privmsg command with the given destination.

func InvokeDisconnected

func InvokeDisconnected()

func InvokeInit

func InvokeInit(plugins []string) error

InvokeInit stops at the first error If plugins is nil, all plugins are inited. Otherwise, only the listed plugins are inited.

func InvokeNewConnection

func InvokeNewConnection(reg irc.HandlerRegistry)

func InvokeTeardown

func InvokeTeardown()

func PluginNames

func PluginNames() []string

func RegisterPlugin

func RegisterPlugin(name string, callbacks Callbacks)

Types

type Callbacks

type Callbacks struct {
	Init          func(*callback.Registry) error
	Teardown      func() error
	NewConnection func(irc.HandlerRegistry)
	Disconnected  func()
}

type IrcConn

type IrcConn struct {
	// contains filtered or unexported fields
}

Some utility functions for connections

func Conn

func Conn(conn *irc.Conn) IrcConn

func (IrcConn) Action

func (c IrcConn) Action(dst, msg string)

func (IrcConn) ActionN

func (c IrcConn) ActionN(dst, msg string, n int)

func (IrcConn) CTCPReply

func (c IrcConn) CTCPReply(dst, cmd, args string)

func (IrcConn) CTCPReplyN

func (c IrcConn) CTCPReplyN(dst, cmd, args string, n int)

func (IrcConn) Notice

func (c IrcConn) Notice(dst, msg string)

func (IrcConn) NoticeN

func (c IrcConn) NoticeN(dst, msg string, n int)

func (IrcConn) Privmsg

func (c IrcConn) Privmsg(dst, msg string)

func (IrcConn) PrivmsgN

func (c IrcConn) PrivmsgN(dst, msg string, n int)

type Plugin

type Plugin struct {
	Name      string
	Callbacks Callbacks
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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