Overview

Last updated: July 24, 2026

IRC Module Overview (dirc)

The dirc package provides the integration between dLANDiscord and IRC (Internet Relay Chat) networks. It allows agents to participate in channels and interact with users via private messages.

Key Features

  • Multi-Network Support: Capable of connecting to multiple IRC networks simultaneously.
  • Persona Integration: IRC agents are mapped to specific personas (e.g., dlan-nikki, dlan-marvin).
  • Channel Management: Automated joining of channels and handling of topic changes.
  • Assistant Integration: Messages in IRC are routed to the assistant module via assistant.ProcessIRCMessage.

Key Files

  • dirc/dirc.go: The main entry point for the IRC client and message handling.
  • dirc/ircagents.go: Logic for managing agent-specific IRC connections and personas.

Integration Flow

  1. Connection: dirc.go initializes the IRC connection using a configured server and port.
  2. Message Ingress: When a message is received (Channel or DM), dirc.go parses the sender and content.
  3. AI Routing: If the message triggers the AI (e.g., via a mention), it is passed to assistant.QueryAssistant.
  4. Response: The agent's response is sent back to the IRC channel or user via the IRC client.

Mermaid Diagram: IRC Message Flow

sequenceDiagram
    participant U as IRC User
    participant I as dirc.go
    participant A as assistant.go
    participant LLM as Multi-LLM Provider

    U->>I: Sends IRC Message (!nikki hello)
    I->>A: QueryAssistant("hello", "nikki", "irc", "chan")
    A->>LLM: Process Request
    LLM-->>A: Agent Response
    A-->>I: Return Response String
    I->>U: Send IRC PRIVMSG

Guidance for AI Agents

  • IRC Formatting: Be aware that IRC supports limited formatting. Avoid complex Markdown that might not render correctly in standard IRC clients.
  • Nickname Registration: Use the irc_nick_register tool (if available) to manage agent nicknames and authentication with NickServ.

Related: dIRC Services Daemon

The dirc client package is distinct from the separate dircservices binary โ€” a server-to-server (S2S) services daemon (NickServ/ChanServ/OperServ/Global/HostServ/BotServ/ALIS/GroupServ/StatServ/SecureServ/GameServ/IdleRPGServ/LoveServ/HelpServ) that links into UnrealIRCd as a U:Lined peer (services.dlan) on irc.dlan:6700. Built in 3 waves starting 2026-07-23; decoupled from this client and from the AI assistant.

See: Key-Packages/dircservices/overview.md ยท Features/dircservices/services-suite.md

Cross-References