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.chaton port6667) - 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
- Choose an IRC network and note its server hostname (for example
irc.libera.chat) - Decide on a nick for the bot, such as
sophon-bot - List the channels you want it to join, comma-separated (for example
#general,#random) - 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
- Go to Channels and click Add Channel
- Select IRC
- Fill in the Server, Nickname, and Channels fields, and adjust the Port if needed (default
6667) - Add a Server Password only if your network requires one
- Click Test Connection — Sophon verifies the TCP connection is open
- 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.
| Field | Type | Required | Description |
|---|---|---|---|
server | text | Yes | IRC server hostname (for example irc.libera.chat) |
port | number | No | Server port; defaults to 6667 if omitted |
nick | text | Yes | The nick the bot registers and sends as |
channels | text | No | Comma-separated list of channels to auto-join (for example #general,#random) |
password | secret | No | Optional 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.
| Type | Inbound | Outbound |
|---|---|---|
| Text | Yes | Yes |
| Images | No | Caption only (no file) |
| Audio | No | No |
| Video | No | No |
| Documents | No | No |
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
nickvalue; the bot does not automatically fall back to an alternate. - No response in a channel — With
groupBehaviorset tomention-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
passwordfield. Note that this is sent as a plainPASSduring 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.