Documentation
¶
Overview ¶
Package irc is used for twitch's irc
Package irc is used for twitch's irc ¶
Package irc is used for twitch's irc
Index ¶
- Constants
- Variables
- type Connection
- func (ircConn *Connection) BlockingSend(line, channel string)
- func (ircConn *Connection) Connect(ip, port string) error
- func (ircConn *Connection) Init(oauth, nick string)
- func (ircConn *Connection) Join(channel string)
- func (ircConn *Connection) Leave(channel string)
- func (ircConn *Connection) Quit()
- func (ircConn *Connection) Reconnect()
- func (ircConn *Connection) Send(line, channel string)
- func (ircConn *Connection) Sendln(line string)
- func (ircConn *Connection) Wait()
- func (ircConn *Connection) WaitForQueue()
- type Message
- type TwitchIRCListener
Constants ¶
const AppName string = "goPurple/irc"
AppName is the name of the application
const FullVersion string = AppName + VersionMajor + "." + VersionMinor + VersionBuild
FullVersion contains the full name and version of this package in a printable string
const VersionBuild string = "s"
VersionBuild is the type of this release. s(table), b(eta), d(evelopment), n(ightly)
const VersionMajor string = "0"
VersionMajor 0 means in development, >1 ensures compatibility with each minor version, but breakes with new major version
const VersionMinor string = "4"
VersionMinor introduces changes that require a new version number. If the major version is 0, they are likely to break compatibility
Variables ¶
var ArchiumDataIdentifier = "Message"
ArchiumDataIdentifier is the identifier to find the actual irc message in the archium message
var ArchiumPrefix = "twitch.irc."
ArchiumPrefix is the prefix used for twitch irc messages on archium
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Username, Host, Port string
JoinedChannels []string
ModOnly bool
// contains filtered or unexported fields
}
Connection holds everything required for an Irc connection to twitch
func (*Connection) BlockingSend ¶
func (ircConn *Connection) BlockingSend(line, channel string)
BlockingSend sends a message to a channel and blocks until its actually sent within ratelimits
func (*Connection) Connect ¶
func (ircConn *Connection) Connect(ip, port string) error
Connect opens a connection to the irc server
func (*Connection) Init ¶
func (ircConn *Connection) Init(oauth, nick string)
Init initializes the connection and logs in
func (*Connection) Reconnect ¶
func (ircConn *Connection) Reconnect()
Reconnect reconnects to the irc server.
func (*Connection) Send ¶
func (ircConn *Connection) Send(line, channel string)
Send sends a message to a channel
func (*Connection) Sendln ¶
func (ircConn *Connection) Sendln(line string)
Sendln sends a raw string to irc. Pls consider using Send instead expect you know what you are doing.
func (*Connection) Wait ¶
func (ircConn *Connection) Wait()
Wait waits until the queue is done and a message to waitingChannel is sent, e.g. the connection is terminated
func (*Connection) WaitForQueue ¶
func (ircConn *Connection) WaitForQueue()
WaitForQueue waits until all queued up irc messages are sent within ratelimits
type TwitchIRCListener ¶
type TwitchIRCListener struct {
ArchiumDataIdentifier, ArchiumPrefix string
IrcConn *Connection
}
TwitchIRCListener is a listener that matches general irc messages on twitch like PING or RECONNECT
func (*TwitchIRCListener) GetTypes ¶
func (til *TwitchIRCListener) GetTypes() []string
GetTypes returns the twitch irc prefix for archium
func (*TwitchIRCListener) Trigger ¶
func (til *TwitchIRCListener) Trigger(ae archium.Event)
Trigger handles PING and RECONNECT