core

package
v0.0.0-...-f7774b9 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Channel string
View Source
var ChannelKey string
View Source
var ChannelName string
View Source
var Channels []string
View Source
var CommandHelp = make(map[string]string)
View Source
var Commands = make(CommandMap)
View Source
var Conf *ini.File
View Source
var Conn *irc.Connection
View Source
var Nick string
View Source
var Running bool = true
View Source
var Server string

Functions

func AddMessageCallback

func AddMessageCallback(callback func(*Message))

TODO: NOT CURRENTLY USED

func HandleMessage

func HandleMessage(message *Message)

func SendToAll

func SendToAll(msg string)

func SendToChannel

func SendToChannel(channel, msg string)

Types

type CommandMap

type CommandMap map[string]func(*Request)

type ConnectionBackend

type ConnectionBackend struct {
	Connect       func() error
	SendToChannel func(channel, msg string) error
	Loop          func()
}
var Backend *ConnectionBackend

type Message

type Message struct {
	Channel string
	Nick    string
	Body    string
}

type Module

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

func NewModule

func NewModule(name string) *Module

func (*Module) Key

func (m *Module) Key(key string) string

func (*Module) RegisterCommand

func (m *Module) RegisterCommand(cmd string, desc string, f func(*Request))

type Request

type Request struct {
	Args    []string
	Message *Message
}

func (*Request) Reply

func (r *Request) Reply(output string)

Jump to

Keyboard shortcuts

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