Features
- TLS/SSL support for secure connections
- SASL PLAIN authentication
- NickServ identification
- Multi-channel support
- Nick collision handling
- Allowlist-based access control
- Plain text output (no markdown)
- Channel and DM support
Configuration
Add IRC to yourconfig.json:
Configuration Options
string
required
IRC server hostname (e.g.,
irc.libera.chat, irc.oftc.net)integer
required
IRC server port. Common values:
6697— TLS/SSL (recommended)6667— Plain text7000— Alternative TLS port
string
required
Bot’s nickname. If taken, NullClaw appends
_ automatically.string
default:"nick"
IRC username (ident). Defaults to nickname if not specified.
string[]
required
List of channels to join (e.g.,
["#bots", "#general"]). Must include # prefix.string[]
default:"[]"
List of allowed IRC nicks. Empty list = deny all. Use
"*" to allow everyone (not recommended).Case-insensitive matching.boolean
default:"true"
Enable TLS/SSL encryption. Highly recommended for security.
string
default:"null"
Server password (sent with PASS command). Required by some servers.
string
default:"null"
NickServ identification password. Used to authenticate registered nicks.
string
default:"null"
SASL PLAIN authentication password. More secure than NickServ for supported servers.
string
default:"default"
Account identifier for multi-account setups
Setup Guide
1
Choose an IRC Server
Popular IRC networks:
- Libera.Chat (
irc.libera.chat:6697) — FOSS projects - OFTC (
irc.oftc.net:6697) — Community support - EFnet (
irc.efnet.org:6697) — Original IRC network - Rizon (
irc.rizon.net:6697) — Anime/gaming communities
2
Register Your Nickname (Optional)
Connect with an IRC client and register:This prevents others from using your bot’s nick.
3
Configure NullClaw
Add IRC to
~/.nullclaw/config.json:4
Join Test Channels
Start with low-traffic channels:
#bots— Test bots here first##test— General testing- Your own channel:
/join #nullclaw_test
5
Start NullClaw
Run
nullclaw and the bot will:- Connect to the IRC server
- Authenticate (if configured)
- Join specified channels
- Respond to messages from allowed nicks
Authentication Methods
SASL PLAIN (Recommended)
NickServ Identification
Server Password
TLS Configuration
Secure Connection (Recommended)
Plain Text Connection
Message Format
IRC output is plain text only (no markdown, no code fences):- No triple backticks
- No tables
- No HTML/XML tags
- Single blank line separates blocks
- Short lines, concise responses
Message Limits
IRC enforces a 512 byte limit per message (including protocol overhead). NullClaw:- Reserves 64 bytes for sender prefix (
:nick!user@host) - Splits at ~448 bytes safe boundary
- Respects UTF-8 character boundaries
Nick Collision Handling
If the nickname is already in use:- NullClaw appends
_:nullclaw_bot→nullclaw_bot_ - Retries up to 5 times:
nullclaw_bot__,nullclaw_bot___, etc. - Fails after 5 attempts
Channel vs DM Behavior
Channel Messages
Bot replies in the channel:Direct Messages
Bot replies via DM:Multiple Servers
Connect to multiple IRC networks:Service Bot Filtering
NullClaw automatically ignores messages from IRC service bots:- NickServ
- ChanServ
- BotServ
- MemoServ
Troubleshooting
Connection Refused
- Verify host and port are correct
- Check firewall/proxy settings
- Try alternative ports: 6697, 6667, 7000
- Test with standard IRC client first
Nickname Already in Use
- Choose a unique nickname
- Register your nick with NickServ
- Configure
nickserv_passwordorsasl_password - Kill ghost sessions:
/msg NickServ GHOST <nick> <password>
Authentication Failed
- Verify password is correct
- Check that nick is registered
- For SASL: ensure server supports SASL PLAIN
- For NickServ: wait for
NickServ IDENTIFYconfirmation - Check logs:
nullclaw --log-level debug
Bot Not Responding
- Verify sender nick is in
allow_from - Check bot has joined the channel:
/whois nullclaw_bot - Ensure channel allows bots (check channel modes)
- Test with DM first to isolate channel issues
TLS Handshake Failed
- Verify server supports TLS on the specified port
- Try a different TLS port (6697, 7000)
- Check for certificate issues
- Fallback to plain text temporarily for debugging:
Message Truncation
- This is normal — IRC has a 512 byte limit
- NullClaw automatically splits messages
- Adjust agent prompt to be more concise for IRC
Source Code
Implementation:src/channels/irc.zig