Sophon Docs
Channels

IRCNEW

Connect Sophon to IRC networks and channels.

Sophon connects to IRC networks using the raw IRC protocol over a plain TCP socket. The adapter opens a connection to your IRC server, registers a nick, joins one or more channels, and relays messages in both directions as IRC PRIVMSG lines.

Prerequisites

  • A reachable IRC server hostname and port (for example irc.libera.chat on port 6667)
  • A nick for the bot that is not already in use on the network
  • The names of the channels you want Sophon to join (each starting with #)
  • Optionally, a server or NickServ password if the network requires one

Step-by-Step Setup

1. Pick a Network and Nick

  1. Choose an IRC network and note its server hostname (for example irc.libera.chat)
  2. Decide on a nick for the bot, such as sophon-bot
  3. List the channels you want it to join, comma-separated (for example #general,#random)
  4. If the network or channels require it, obtain a server password or register the nick with NickServ to get a password

2. Configure in Sophon Dashboard

  1. Go to Channels and click Add Channel
  2. Select IRC
  3. Fill in the Server, Nickname, and Channels fields, and adjust the Port if needed (default 6667)
  4. Add a Server Password only if your network requires one
  5. Click Test Connection — Sophon verifies the TCP connection is open
  6. Click Activate

3. Test It

Once activated, Sophon joins the configured channels after the server's message-of-the-day completes. Send a message in one of those channels, or send a private message to the bot's nick, and Sophon should respond. Messages the bot sends itself are ignored, so there is no echo loop.

Configuration Reference

These are the keys the adapter reads from a channel's settings. In the Sophon Dashboard the nick field is labelled Nickname, but the stored configuration key is nick.

FieldTypeRequiredDescription
servertextYesIRC server hostname (for example irc.libera.chat)
portnumberNoServer port; defaults to 6667 if omitted
nicktextYesThe nick the bot registers and sends as
channelstextNoComma-separated list of channels to auto-join (for example #general,#random)
passwordsecretNoOptional server or NickServ password sent during the handshake

channels.json Example

{
  "id": "irc-libera",
  "type": "irc",
  "name": "Sophon IRC Bot",
  "enabled": true,
  "config": {
    "server": "irc.libera.chat",
    "port": "6667",
    "nick": "sophon-bot",
    "channels": "#general,#random",
    "password": "<encrypted>"
  },
  "routing": {
    "agentId": "default",
    "dmBehavior": "main-session",
    "groupBehavior": "mention-only"
  },
  "status": "connected"
}

Media Support

IRC is a text-only protocol, so the adapter only carries plain text. Outbound messages are split per line and sent as individual PRIVMSG lines. An outbound image is sent as its caption text, or the placeholder [Image] when no caption is present — the image file itself is not transferred.

TypeInboundOutbound
TextYesYes
ImagesNoCaption only (no file)
AudioNoNo
VideoNoNo
DocumentsNoNo

Troubleshooting

  • Bot never joins channels — Channels are only joined after the server signals the end of its MOTD. If the network is slow or the MOTD is suppressed, joining may be delayed. Confirm each channel name starts with # and is comma-separated.
  • "IRC not connected" on Test Connection — The TCP socket is not open. Verify the Server hostname and Port are correct and reachable from the Sophon host, and that no firewall blocks the connection.
  • Nick already in use — The chosen nick is taken on the network. Pick a different nick value; the bot does not automatically fall back to an alternate.
  • No response in a channel — With groupBehavior set to mention-only, the bot replies only when addressed. Some channels also require the nick to be registered or invited before it can speak.
  • Authentication required — If the network needs a password, set the password field. Note that this is sent as a plain PASS during the handshake, so prefer a TLS-enabled port and network if confidentiality matters.

For routing and session behavior shared across channels, see Channels. To run Sophon close to your IRC server, see Sophon Node.