bot

package
v0.0.0-...-bf8be2a Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AM *anagrams.AnagramMap

AM holds anagram maps keyed off of their characters sorted

View Source
var ChannelHistory map[string]*history.HistoryHeap

ChannelHistory is a map of channel histories recording recent user messages

Functions

func AnagramCmdParse

func AnagramCmdParse(trimmed string) []string

func AnagramResponder

func AnagramResponder(e *irc.Event, con *irc.Connection, logger *log.Logger)

AnagramResponder returns previous user messages with text anagramed

func ChannelHistorian

func ChannelHistorian(e *irc.Event)

ChannelHistorian takes channel messages and records them in a HistoryHeap to save them for potential anagramming!

func EventResponse

func EventResponse(e parse.CalEvent, user string, etype string) []string

EventResponse creates a []string of useful information of an Event(struct) which will be sent to inquiring user.

func GopherHandler

func GopherHandler(e *irc.Event, con *irc.Connection)

GopherHandler which responds with the next meeting type for the !nextmeetup command

func IRCConnect

func IRCConnect(ircconfig parse.IRCConfig)

IRCConnect initializes and runs the irc connection and adds the GopherHandler to its event loop for parsing messages

func LoadCalendar

func LoadCalendar()

LoadCalendar reads in the Events from their JSON definitions and applies it to global 'events' variable for access

func SendPrivMsgs

func SendPrivMsgs(con *irc.Connection, channel string, msgs []string)

SendPrivMsgs broadcasts PRIVMSGs via the given client and channel. msgs []string; are the messages to be sent

Types

type Events

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

Events contain both hack/talk night Event structs for global access

var CalEvents Events

CalEvents variable holds talk/hack night calendar/event information

Jump to

Keyboard shortcuts

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