irc

package
v0.0.0-...-ad95108 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

package irc provides an interface to IRC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// Config is the configuration of the Client.
	Config Config

	// Conn is the IRC connection itself.
	Conn *irc.Connection
}

Client provides a client to IRC.

func NewClient

func NewClient(config Config) (*Client, error)

NewClient returns a new IRC Client, given a configuration.

func (*Client) GetNames

func (c *Client) GetNames(namesResponseChan chan string)

GetNames connects to the channel, issues a NAMES command, and returns the raw message on namesResponseChan.

type Config

type Config struct {
	// Address is the address of the IRC channel to connect to - e.g: "irc.quakenet.org:6667".
	Address string
	// Channel is the channel you want to connect to.
	Channel string

	// Nickname is the nickname to use to connect.
	Nickname string
	// Username is the username to use to connect.
	Username string
}

Config provides configuration for the IRC client.

Jump to

Keyboard shortcuts

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