gcModules

package
v0.0.0-...-c1a83f8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2015 License: BSD-3-Clause, ISC, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDefaultModules

func LoadDefaultModules(bot *gochat.Bot)

Loads the default provided Modules

Types

type BotReportMod

type BotReportMod struct {
}

Bot report - Bot will respond when .bots is used

func (*BotReportMod) IsValid

func (m *BotReportMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*BotReportMod) ParseMessage

func (m *BotReportMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

type ChanJoinMod

type ChanJoinMod struct {
}

Instructs the bot to join a channel - Requires operator status

func (*ChanJoinMod) IsValid

func (m *ChanJoinMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*ChanJoinMod) ParseMessage

func (m *ChanJoinMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

type CuteMod

type CuteMod struct {
	Updating bool
	Pics     []string
}

Returns a link to a random cute pic, courtesy of /c/

func (*CuteMod) Init

func (m *CuteMod) Init()

func (*CuteMod) IsValid

func (m *CuteMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*CuteMod) ParseMessage

func (m *CuteMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

func (*CuteMod) Update

func (m *CuteMod) Update()

type IgnoreMod

type IgnoreMod struct {
}

Allows for Ignores/Unignores of the specified Nick. Good for dealing with bot feedback loops and spammers. Requires operator status

func (*IgnoreMod) IsValid

func (m *IgnoreMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*IgnoreMod) ParseMessage

func (m *IgnoreMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

type PingMod

type PingMod struct {
}

Ping module -- Returns Pong! on receiving .ping

func (*PingMod) IsValid

func (p *PingMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*PingMod) ParseMessage

func (p *PingMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

type QuoteMod

type QuoteMod struct {
}

Returns a random quote from a user

func (*QuoteMod) IsValid

func (m *QuoteMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*QuoteMod) ParseMessage

func (m *QuoteMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

type SayMod

type SayMod struct {
}

Say module. If a user says .say [msg] the bot will repeat into the channel [msg]

func (*SayMod) IsValid

func (m *SayMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*SayMod) ParseMessage

func (m *SayMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

type SedMod

type SedMod struct {
	Re *regexp.Regexp
}

Allows user to perform a s/[original]/[new]/ on previous text

func (*SedMod) Init

func (s *SedMod) Init()

func (*SedMod) IsValid

func (s *SedMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*SedMod) ParseMessage

func (s *SedMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

type URLMod

type URLMod struct {
	Re *regexp.Regexp
}

URL title detection module -- Returns the URL title when it detects a URL

func (*URLMod) Init

func (u *URLMod) Init()

func (*URLMod) IsValid

func (u *URLMod) IsValid(msg *gochat.Message, c *gochat.Channel) bool

func (*URLMod) ParseMessage

func (u *URLMod) ParseMessage(msg *gochat.Message, c *gochat.Channel) string

Jump to

Keyboard shortcuts

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