Documentation
¶
Overview ¶
Package irc is a minimal, in-process IRC client for the `irc@` route: it connects a member to the BBS's own (members-only) Ergo network and drives a Bubble Tea TUI (see tui.go). It runs inside the agentbbs process on the host, so it reaches Ergo's loopback listener directly and — unlike running a third-party client like irssi in a pod — offers no /exec shell escape.
The member is already authenticated to the BBS by their SSH key; we present their account name to Ergo over SASL PLAIN. Ergo's auth-script approves the login on membership alone (the passphrase is ignored, by design), so we send a placeholder.
Index ¶
Constants ¶
const DefaultAddr = "127.0.0.1:6667"
DefaultAddr is the host-local plaintext Ergo listener (loopback only; the public front door is 6697/TLS). Overridable for dev hosts.
const DefaultChannel = "#lobby"
DefaultChannel is joined automatically when a member enters via irc@.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a single member's connection to the network.
func Dial ¶
Dial connects to addr, performs the SASL PLAIN handshake as nick, and blocks until the server welcomes us (001) or the attempt fails. On success the read loop is running and Events() is live.
func (*Client) Events ¶
Events is the stream the TUI consumes. It is closed when the connection ends.
type Event ¶
type Event struct {
Kind EventKind
// Channel is the conversation the event belongs to ("" = server/status).
Channel string
Nick string
Text string
}
Event is one thing that happened on the connection, already formatted for display. Kind groups them so the TUI can colorize.