core

package
v0.0.0-...-c3b4ab3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: GPL-2.0 Imports: 10 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ignored map[string]bool = make(map[string]bool)

Functions

func AddCommand

func AddCommand(cmd string, handler func([]string, string, string))

func AddModule

func AddModule(triggerType string, handler func(ircmessage.Message))

func LoadConfig

func LoadConfig()

func PassToModules

func PassToModules(msg ircmessage.Message)

Types

type Bot

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

func NewBot

func NewBot(nick string, server string, port int, tls bool) *Bot

func (*Bot) Connect

func (bot *Bot) Connect()

func (*Bot) Disconnect

func (bot *Bot) Disconnect()

func (*Bot) SendCommand

func (bot *Bot) SendCommand(cmd string)

func (*Bot) SendJoin

func (bot *Bot) SendJoin(channel string)

func (*Bot) SendMessage

func (bot *Bot) SendMessage(to string, content string)

func (*Bot) SendPart

func (bot *Bot) SendPart(channel string)

func (*Bot) Start

func (bot *Bot) Start()

type Channelsetting

type Channelsetting struct {
	Disabled  bool
	Replies   [][]string
	Blacklist []string
}

type ConfStruct

type ConfStruct struct {
	Nick     string
	Server   string
	Port     int
	TLS      bool
	Channels struct {
		Autojoin  []string
		Blacklist []string
	}
	Admins       []string
	Ignored      []string
	Chan         map[string]Channelsetting
	FloodControl struct {
		Invite FloodSetting
		Link   FloodSetting
		Reply  FloodSetting
	}
}
var Config ConfStruct

type FloodSetting

type FloodSetting struct {
	Time int
	Max  int
}

Jump to

Keyboard shortcuts

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