Connection, identity, and auth options.
The live session.
import { connect } from 'edgeport/irc';
await using irc = await connect({ hostname: 'irc.example.com', nick: 'edgebot' });
await irc.join('#edgeport');
await irc.say('#edgeport', 'hello from the edge');
for await (const m of irc.messages()) {
if (m.isChannel) console.log(`<${m.from}> ${m.text}`);
break;
}
Connects to an IRC server, registers, and returns a live session.
Dials the core transport (implicit TLS when
tls: 'implicit', otherwise plaintext), sendsPASSif given, runs the IRCv3 CAP + SASL exchange whensaslis set, then registers withNICK+USERand waits for001(RPL_WELCOME). A433(nick in use) or other fatal registration numeric rejects with AuthError. A background pump then answersPINGs and routes messages/events.