plugins

package
v0.0.0-...-8d88da4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTML_ENTITIES = map[string]string{}/* 249 elements not displayed */
View Source
var VimeoEmptyResultsError = errors.New("Vimeo: Some of the fields were empty :(")
View Source
var VimeoNoResultsError = errors.New("Vimeo: No results")

Functions

func GetFirstMatch

func GetFirstMatch(re *regexp.Regexp, matchee *string) (match *string, err error)

Types

type AmiAmi

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

func (AmiAmi) Event

func (plug AmiAmi) Event() chan IRCMessage

func (*AmiAmi) FindUri

func (plug *AmiAmi) FindUri(candidate *string) (uri *string, err error)

func (AmiAmi) Match

func (plug AmiAmi) Match(msg *IRCMessage) bool

func (*AmiAmi) Setup

func (plug *AmiAmi) Setup(write chan IRCMessage, conf PluginConf)

func (AmiAmi) Write

func (plug AmiAmi) Write(msg *IRCMessage, body *string) (err error)

type Autoban

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

func (Autoban) Action

func (plug Autoban) Action()

func (Autoban) Ban

func (plug Autoban) Ban(msg *IRCMessage, match bool, spam bool)

func (Autoban) Event

func (plug Autoban) Event() chan IRCMessage

func (*Autoban) Match

func (plug *Autoban) Match(msg *IRCMessage) bool

func (*Autoban) Setup

func (plug *Autoban) Setup(write chan IRCMessage, conf PluginConf)

type AutobanConf

type AutobanConf struct {
	Matches []AutobanMatches `json:"matchers"`
	User    string           `json:"notify_user"`
}

type AutobanMatches

type AutobanMatches struct {
	Matcher *regexp.Regexp
	Time    string   `json:"time"`
	Regex   string   `json:"match"`
	Strip   []string `json:"strip"`
	Reason  string   `json:"reason"`
}

type Help

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

func (Help) Action

func (plug Help) Action()

func (Help) Event

func (plug Help) Event() chan IRCMessage

func (Help) Match

func (plug Help) Match(msg *IRCMessage) bool

func (*Help) Setup

func (plug *Help) Setup(write chan IRCMessage, conf PluginConf)

type IRCMessage

type IRCMessage struct {
	Channel   string
	Msg       string
	User      string
	Mask      string
	When      time.Time
	Unlimited bool
}

type Mal

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

func (Mal) Event

func (plug Mal) Event() chan IRCMessage

func (*Mal) FindUri

func (plug *Mal) FindUri(candidate *string) (uri *string, err error)

func (Mal) Match

func (plug Mal) Match(msg *IRCMessage) bool

func (*Mal) Setup

func (plug *Mal) Setup(write chan IRCMessage, conf PluginConf)

func (Mal) Write

func (plug Mal) Write(msg *IRCMessage, body *string) (err error)

type MalConf

type MalConf struct {
	User      string `json:"user"`
	Password  string `json:"password"`
	UserAgent string `json:"user_agent"`
}

type MyFigureCollection

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

func (MyFigureCollection) Event

func (plug MyFigureCollection) Event() chan IRCMessage

func (*MyFigureCollection) FindUri

func (plug *MyFigureCollection) FindUri(candidate *string) (uri *string, err error)

func (MyFigureCollection) Match

func (plug MyFigureCollection) Match(msg *IRCMessage) bool

func (*MyFigureCollection) Setup

func (plug *MyFigureCollection) Setup(write chan IRCMessage, conf PluginConf)

func (MyFigureCollection) Write

func (plug MyFigureCollection) Write(msg *IRCMessage, body *string) (err error)

type Plamoya

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

func (Plamoya) Event

func (plug Plamoya) Event() chan IRCMessage

func (*Plamoya) FindUri

func (plug *Plamoya) FindUri(candidate *string) (uri *string, err error)

func (Plamoya) Match

func (plug Plamoya) Match(msg *IRCMessage) bool

func (*Plamoya) Setup

func (plug *Plamoya) Setup(write chan IRCMessage, conf PluginConf)

func (Plamoya) Write

func (plug Plamoya) Write(msg *IRCMessage, body *string) (err error)

type Plugin

type Plugin interface {
	Match(*IRCMessage) bool
	Event() chan IRCMessage
	Setup(chan IRCMessage, PluginConf)
}

type PluginConf

type PluginConf struct {
	Mal      MalConf     `json:"mal"`
	Autoban  AutobanConf `json:"autoban"`
	Youtube  YoutubeConf `json:"youtube"`
	UserName string
}

type Reddit

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

func (Reddit) Event

func (plug Reddit) Event() chan IRCMessage

func (*Reddit) FindUri

func (plug *Reddit) FindUri(candidate *string) (uri *string, err error)

func (Reddit) Match

func (plug Reddit) Match(msg *IRCMessage) bool

func (*Reddit) Setup

func (plug *Reddit) Setup(write chan IRCMessage, conf PluginConf)

func (Reddit) Write

func (plug Reddit) Write(msg *IRCMessage, body *string) (err error)

type Vimeo

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

func (Vimeo) Event

func (plug Vimeo) Event() chan IRCMessage

func (*Vimeo) FindUri

func (plug *Vimeo) FindUri(candidate *string) (uri *string, err error)

func (Vimeo) Match

func (plug Vimeo) Match(msg *IRCMessage) bool

func (*Vimeo) Setup

func (plug *Vimeo) Setup(write chan IRCMessage, conf PluginConf)

func (Vimeo) Write

func (plug Vimeo) Write(msg *IRCMessage, body *string) (err error)

type Youtube

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

func (Youtube) Event

func (plug Youtube) Event() chan IRCMessage

func (*Youtube) FindUri

func (plug *Youtube) FindUri(candidate *string) (uri *string, err error)

func (Youtube) Match

func (plug Youtube) Match(msg *IRCMessage) bool

func (*Youtube) Setup

func (plug *Youtube) Setup(write chan IRCMessage, conf PluginConf)

func (Youtube) Write

func (plug Youtube) Write(msg *IRCMessage, body *string) (err error)

type YoutubeConf

type YoutubeConf struct {
	Key string `json:"key"`
}

Jump to

Keyboard shortcuts

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