Documentation ¶
Overview ¶
Package godrop is an IRC client library.
Index ¶
- Variables
- type Client
- func (c *Client) Close() error
- func (c *Client) Connect() error
- func (c *Client) GetNick() string
- func (c *Client) IsConnected() bool
- func (c *Client) IsRegistered() bool
- func (c *Client) Join(name string) error
- func (c *Client) Loop() error
- func (c *Client) Message(target string, message string) error
- func (c *Client) Nick() error
- func (c *Client) Oper(name string, password string) error
- func (c *Client) Pong(ping irc.Message) error
- func (c *Client) Quit(message string) error
- func (c Client) ReadMessage() (irc.Message, error)
- func (c *Client) Register() error
- func (c *Client) SetRegistered()
- func (c *Client) SetTimeoutTime(d time.Duration)
- func (c *Client) User() error
- func (c *Client) UserMode(nick string, modes string) error
- func (c Client) WriteMessage(m irc.Message) error
Constants ¶
This section is empty.
Variables ¶
var Hooks []func(*Client, irc.Message)
Hooks are functions to call for each message. Packages can take actions this way.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Config holds the parsed config file data. // // TODO(horgh): This doesn't really seem to belong here. Config map[string]string // contains filtered or unexported fields }
Client holds an IRC client connection.
func (*Client) IsConnected ¶
IsConnected checks whether the client is connected
func (*Client) IsRegistered ¶
IsRegistered checks whether the client is registered.
func (*Client) Loop ¶
Loop enters a loop reading from the server.
We maintain the IRC connection.
Hook events will fire.
func (*Client) Message ¶
Message sends a message.
If the message is too long for a single line, then it will be split over several lines.
func (*Client) Quit ¶
Quit sends a quit.
We track when we send this as we expect an ERROR message in response.
func (Client) ReadMessage ¶
ReadMessage reads a line from the connection and parses it as an IRC message.
func (*Client) Register ¶
Register sends the client's registration/greeting. This consists of NICK and USER.
func (*Client) SetRegistered ¶
func (c *Client) SetRegistered()
SetRegistered sets us as registered.
func (*Client) SetTimeoutTime ¶
SetTimeoutTime sets the duration we wait on reads/writes.
Directories ¶
Path | Synopsis |
---|---|
Package duckduckgo provides the ability to query DuckDuckGo from IRC.
|
Package duckduckgo provides the ability to query DuckDuckGo from IRC. |
Package oper makes the client become an operator.
|
Package oper makes the client become an operator. |
Package recordips makes a client watch for user connection notices (as operator).
|
Package recordips makes a client watch for user connection notices (as operator). |
Package twitchstreams provides a way to notify about users streaming on Twitch.
|
Package twitchstreams provides a way to notify about users streaming on Twitch. |