pingrelay

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ESIEndpoint = "esi.tech.ccp.is"
)

Variables

View Source
var DefaultMaxSimilarity float64 = 0.75

Functions

func StrSliceContainsStr

func StrSliceContainsStr(s string, slice []string) bool

StrSliceContainsStr returns a boolean if s is found in slice

Types

type IRCMessage

type IRCMessage struct {
	Message string  `json:"message"`
	From    string  `json:"nick"`
	RecvAt  float64 `json:"now"`
}

IRCMessage defines the ZMQ payload from ZNC

type NCPing

type NCPing struct {
	// From indicates who sent the ping
	From string
	// ToGroup indicates where the ping was sent to
	ToGroup string
	// Ping indicates the contents of the ping
	Ping string
}

NCPing defines a NC. ping

func ParseNCMessage

func ParseNCMessage(ircmsg string) (*NCPing, error)

ParseNCMessage validates and parses an NC. ping based on the PL services code

type OnPingMessage

type OnPingMessage func(channelID string, ping NCPing) error

type PingStat

type PingStat struct {
	TotalPings    int
	TotalDiscards int
	LastMessage   string
}

Jump to

Keyboard shortcuts

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