irc

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server   string
	Port     int
	Channel  string
	Nick     string
	Name     string
	User     string
	SASLUser string
	SASLPass string
	Retry    bool
}

type IRCClient

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

IRCClient is a thin wrapper around girc client

func NewIRCClient

func NewIRCClient(log *logrus.Logger) *IRCClient

func (*IRCClient) Close

func (irc *IRCClient) Close()

Close closes the connection

func (*IRCClient) Connect

func (irc *IRCClient) Connect() error

func (*IRCClient) InChannel

func (irc *IRCClient) InChannel(nick string) bool

InChannel checks if a user is in the channel

func (*IRCClient) IsAdmin

func (irc *IRCClient) IsAdmin(nick string) bool

IsAdmin checks if a user is in the channel

func (*IRCClient) IsRegistered

func (irc *IRCClient) IsRegistered(nick string) bool

IsRegistered checks if a user is registered

func (*IRCClient) MiniClient added in v1.3.0

func (irc *IRCClient) MiniClient()

MiniClient starts a mini clients which provides basic irc commands

func (*IRCClient) OnEvent

func (irc *IRCClient) OnEvent(callback func(event girc.Event))

OnEvent registers a callback

func (*IRCClient) Send

func (irc *IRCClient) Send(message string)

Send sends an msg to the configured channel

func (*IRCClient) SendTo added in v1.2.0

func (irc *IRCClient) SendTo(user, message string)

SendTo sends to a specific user

func (*IRCClient) Sendf

func (irc *IRCClient) Sendf(format string, a ...interface{})

Sendf works like printf but for irc msgs.

func (*IRCClient) Sendnl added in v1.15.0

func (irc *IRCClient) Sendnl(message string)

Sendnl works like Send but interprets \n.

Jump to

Keyboard shortcuts

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