plugins

package
v0.0.0-...-701f7b7 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2014 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const FUNC = 57347
View Source
const NUM = 57346

Variables

This section is empty.

Functions

func Dice

func Dice(c *irc.Client, e *irc.Event)

func IsItDown

func IsItDown(c *irc.Client, e *irc.Event)

func Mentions

func Mentions(c *irc.Client, e *irc.Event)

func Metar

func Metar(c *irc.Client, e *irc.Event)

func NewCTCPPlugin

func NewCTCPPlugin(m *mux.CTCPMux) error

func NewChancePlugin

func NewChancePlugin(b *bot.Bot, m *mux.CommandMux) error

func NewDBPlugin

func NewDBPlugin(b *bot.Bot) (*sqlx.DB, error)

func NewDicePlugin

func NewDicePlugin(m *mux.MentionMux) error

func NewForecastPlugin

func NewForecastPlugin(b *bot.Bot, m *mux.CommandMux) error

func NewKarmaPlugin

func NewKarmaPlugin(c *mux.CommandMux, b *irc.BasicMux, db *sqlx.DB) error

func NewMathPlugin

func NewMathPlugin(m *mux.CommandMux) error

func NewMentionsPlugin

func NewMentionsPlugin(m *mux.MentionMux) error

func NewMetarPlugin

func NewMetarPlugin(m *mux.CommandMux) error

func NewURLPlugin

func NewURLPlugin(bm *irc.BasicMux, cm *mux.CommandMux) error

func URLTitle

func URLTitle(c *irc.Client, e *irc.Event)

Types

type CTCPPlugin

type CTCPPlugin struct{}

func (*CTCPPlugin) Ping

func (p *CTCPPlugin) Ping(c *irc.Client, e *irc.Event)

func (*CTCPPlugin) Time

func (p *CTCPPlugin) Time(c *irc.Client, e *irc.Event)

func (*CTCPPlugin) Version

func (p *CTCPPlugin) Version(c *irc.Client, e *irc.Event)

type ChancePlugin

type ChancePlugin struct {
	RouletteGunSize int
	// contains filtered or unexported fields
}

func (*ChancePlugin) Coin

func (p *ChancePlugin) Coin(c *irc.Client, e *irc.Event)

func (*ChancePlugin) Roulette

func (p *ChancePlugin) Roulette(c *irc.Client, e *irc.Event)

type Coordinates

type Coordinates struct {
	Lat float64
	Lon float64
}

type DBPlugin

type DBPlugin struct {
	Driver     string
	DataSource string
}

type DataBlock

type DataBlock struct {
	Summary string
	Icon    string
	Data    []DataPoint
}

type DataPoint

type DataPoint struct {
	Time                   int64
	Summary                string
	Icon                   string
	SunriseTime            float64
	SunsetTime             float64
	PrecipIntensity        float64
	PrecipIntensityMax     float64
	PrecipIntensityMaxTime float64
	PrecipProbability      float64
	PrecipType             string
	PrecipAccumulation     float64
	Temperature            float64
	TemperatureMin         float64
	TemperatureMinTime     float64
	TemperatureMax         float64
	TemperatureMaxTime     float64
	DewPoint               float64
	WindSpeed              float64
	WindBearing            float64
	CloudCover             float64
	Humidity               float64
	Pressure               float64
	Visibility             float64
	Ozone                  float64
}

Basic structures from https://github.com/mlbright/forecast/blob/master/v2/forecast.go TODO: cleanup

type Flags

type Flags struct {
	DarkSkyUnavailable string
	DarkSkyStations    []string
	DataPointStations  []string
	ISDStations        []string
	LAMPStations       []string
	METARStations      []string
	METNOLicense       string
	Sources            []string
	Units              string
}

type ForecastCacheEntry

type ForecastCacheEntry struct {
	Coordinates Coordinates
	Created     time.Time
	Response    ForecastResponse
}

type ForecastPlugin

type ForecastPlugin struct {
	Key string
}

func (*ForecastPlugin) Forecast

func (p *ForecastPlugin) Forecast(c *irc.Client, e *irc.Event)

func (*ForecastPlugin) Weather

func (p *ForecastPlugin) Weather(c *irc.Client, e *irc.Event)

type ForecastResponse

type ForecastResponse struct {
	Latitude  float64
	Longitude float64
	Timezone  string
	Offset    float64
	Currently DataPoint
	Minutely  DataBlock
	Hourly    DataBlock
	Daily     DataBlock
	Alerts    []alert
	Flags     Flags
	APICalls  int
}

type KarmaPlugin

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

func (*KarmaPlugin) CleanedName

func (p *KarmaPlugin) CleanedName(name string) string

func (*KarmaPlugin) GetKarmaFor

func (p *KarmaPlugin) GetKarmaFor(name string) int

func (*KarmaPlugin) Karma

func (p *KarmaPlugin) Karma(c *irc.Client, e *irc.Event)

func (*KarmaPlugin) Msg

func (p *KarmaPlugin) Msg(c *irc.Client, e *irc.Event)

func (*KarmaPlugin) UpdateKarma

func (p *KarmaPlugin) UpdateKarma(name string, diff int) int

type LastAddress

type LastAddress struct {
	Nick     string
	Location Location
}

type Location

type Location struct {
	Address string
	Coords  Coordinates
}

func FetchLocation

func FetchLocation(where string) (*Location, error)

type LocationResponse

type LocationResponse struct {
	Results []struct {
		Address  string `json:"formatted_address"`
		Geometry struct {
			Location struct {
				Lat float64 `json:"lat"`
				Lon float64 `json:"lng"`
			} `json:"location"`
		} `json:"geometry"`
	} `json:"results"`
	Status string `json:"status"`
}

type LocationResult

type LocationResult struct {
}

type MentionsPlugin

type MentionsPlugin struct{}

type MetarPlugin

type MetarPlugin struct{}

Jump to

Keyboard shortcuts

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