bantracker

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PermBTAdmin   = "bantracker.admin" // Constant for assigning a permission to bantracker admins
	PermBTView    = "bantracker.view"  // Constant for assigning a permission to bantracker viewers
	PermBTPattern = "bantracker.%s.%s"
)

Define constants

Variables

This section is empty.

Functions

func CheckBan added in v0.0.5

func CheckBan(b *Ban, user *channeltracker.User) bool

Types

type Ban added in v0.0.5

type Ban struct {
	Source   string
	Type     string
	Pattern  string
	Forward  string
	Negation bool
	Raw      string
}

Ban tracks the type and pattern of each ban. If a $j ban, stores the sub bans

func ParseBan added in v0.0.5

func ParseBan(channel, ban string) *Ban

type BanList added in v0.0.5

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

BanList stores the bans for a channel

type BanTracker

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

BanTracker is the base type for this plugin, all functionality is built on this

func (*BanTracker) GetMatchingBans added in v0.0.5

func (b *BanTracker) GetMatchingBans(channel string, user *channeltracker.User) []*Ban

type ChannelConfig added in v0.0.5

type ChannelConfig struct {
	gorm.Model
	Target  string `gorm:"unique"`
	Monitor string
	Logging string
	Echo    bool
}

ChannelConfig stores the information for each channel.

Jump to

Keyboard shortcuts

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