Skip to content

prime001/BitchX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitchX — Modernized

The legendary terminal IRC client, updated for 2026. Now with AI.

BitchX was the most popular terminal IRC client of the late 1990s and early 2000s. This fork modernizes it for current systems while preserving the original look, feel, and attitude — and adds something the original never had: Claude AI built directly into the client.

What's New

AI Integration — /AI Command

The world's first AI-powered IRC client. Claude is built into BitchX as a native command.

/AI what is Bitcoin?              Ask Claude anything — response shows in your window
/AI SAY explain this to everyone  Claude generates a message and sends it to the channel
/AI REPLY                         Contextual reply based on the last 20 lines of chat
/AI SUMMARIZE                     Summarize the last 50 lines of channel conversation
/AI TRANSLATE Spanish             Translate the last message to any language
/AI AWAY playing Elden Ring       AI responds to PMs while you're away — intelligently
/AI ON                            Enable AI features
/AI OFF                           Disable AI features

How it works: BitchX spawns the Claude CLI as a child process using pipe()/fork()/execlp() — no shell involved, no command injection possible. Your prompt is written to Claude's stdin via pipe, and the response is read back and displayed. Chat history is maintained in a 50-line ring buffer for context-aware commands like /AI REPLY and /AI SUMMARIZE.

Requires: The claude CLI binary in your PATH. Install it with npm install -g @anthropic-ai/claude-code or download from claude.ai/download. If Claude CLI is not installed, BitchX will tell you — all other features work normally without it.

Security: All IRC-sourced input (nicks, messages, channel names) is sanitized before being passed to the AI — control characters, shell metacharacters, and prompt injection attempts are stripped. The AI away responder is rate-limited to 1 reply per nick per 60 seconds to prevent abuse.

Security Hardening

  • TLS 1.3SSLv23_client_method()TLS_client_method() for OpenSSL 3.x
  • SASL PLAIN Authentication — Connect to Libera.chat, OFTC, DALnet, and modern networks
  • CVE Fix — Remote DoS via CTCP UTC parsing (null dereference + input validation)
  • 57+ sprintf → snprintf conversions in network-facing code
  • bzero → memset, bcopy → memcpy — deprecated POSIX calls modernized
  • inet_addr → inet_pton — IPv4 address parsing modernized
  • RCE prevention — AI module uses pipe()/fork()/execlp(), never popen() or shell evaluation
  • SASL memory leak — Fixed base64 output leak in authentication flow

Fun Tools — /RAINBOW, /CRYPTO, /WEATHER, and more

BitchX comes loaded with built-in tools that no other IRC client has:

/RAINBOW <text>          Rainbow-colored text to channel 🌈
/ASCII <text>            Big block-letter ASCII art to channel
/MATRIX                  Matrix-style green digital rain (local display)
/CRYPTO                  Live BTC, ETH, SOL prices from CoinGecko
/CRYPTO DOGE             Price for any specific coin
/WEATHER Atlanta         Weather for any city via wttr.in
/SEEN <nick>             When was someone last active?
/URLTITLE                Toggle auto URL title fetching from chat links
/DICE 3d20               Roll dice — any NdN format
/FIGLET <text>           Big figlet text (uses system figlet or built-in font)
/COUNTDOWN 5 GO!         Countdown timer to channel (1-30 seconds)
/FLIP                    Flip a coin — HEADS or TAILS

All external calls (weather, crypto prices) run in background processes — BitchX never freezes.

Channel Operations Suite — Run Your Channel Like a Boss

Full channel management toolkit for operators:

/MASSOP                  Op everyone in the channel
/MASSDEOP                Deop everyone except yourself
/MASSVOICE               Voice everyone
/MASSDEVOICE             Remove voice from everyone
/MASSKICK <reason>       Kick all non-ops
/LOCKDOWN                Instant security: +mntsi (moderated, secret, invite-only)
/UNLOCK                  Remove lockdown: -msi
/KICKBAN <nick> <reason> Kick + ban (*!*@host) in one command
/TEMPBAN <nick> 30 spam  Kick + ban, auto-unban after 30 minutes
/CHANSTATS               Channel stats: users, ops, voices, topic, modes
/TOPICROTATE 60 Topic 1 | Topic 2 | Topic 3
                         Auto-rotate channel topic on a timer

Auto-moderation:

/GREETING Welcome!       Auto-greet users who join your channel
/AUTOOP friend!*@*       Auto-op trusted users when they join
/AUTOOPLIST              Show your auto-op list
/AUTOOPREMOVE friend     Remove from auto-op
/GUARD                   Toggle guard mode: clone detection + bad word kicks
/BADWORD spam            Add a word to the kick-on-sight list
/BADWORDLIST             Show all bad words
/BADWORDREMOVE spam      Remove a bad word

Guard mode automatically detects and bans clones (3+ joins from same host in 60 seconds) and kicks anyone who triggers a bad word.

IRC Services Compatibility

IRC services (NickServ, ChanServ, MemoServ, OperServ, BotServ, HostServ, and others) are now whitelisted from BitchX's flood protection. No more auto-ignoring NickServ when you try to register your nick.

CI/CD & Docker

  • GitHub Actions — Automated build on every push and PR
  • Dockerfile — Multi-stage build, minimal runtime image, runs as non-root
docker build -t bitchx .
docker run -it bitchx -n YourNick irc.libera.chat:+6697

Building

# Prerequisites
sudo apt install autoconf automake libssl-dev libncurses-dev build-essential

# Build
git clone https://github.com/prime001/BitchX.git
cd BitchX
./autogen.sh
./configure --with-ssl
make -j$(nproc)

# Install (optional — adds 'BitchX' to your PATH)
sudo ln -sf $(pwd)/source/BitchX /usr/local/bin/BitchX

# Run
BitchX -n YourNick irc.dal.net

Connecting to IRC

# Non-SSL
/server irc.dal.net

# SSL/TLS (port 6697)
/server -ssl irc.libera.chat 6697

# With SASL auth
# Format: server:+port:password:nick:network:saslnick:saslpass
/server irc.libera.chat:+6697:::Libera:yournick:yourpassword

AI Examples

Ask a question — response shows only to you:

/AI what are the best IRC networks in 2026?

Generate and send a message to the channel:

/AI SAY give everyone a hot take about cryptocurrency

Catch up on a conversation you missed:

/AI SUMMARIZE
--- AI Summary ---
• Discussion about Rust vs Go for network services
• Two users debating whether IRC or Matrix is better
• Someone shared a link to a new MCP server for payments
--- End Summary ---

AI-powered away message:

/AI AWAY working on my card game, back in an hour

When someone PMs you, Claude responds naturally:

[AI Away → CoolUser]: Hey! Erik's away right now working on a card game.
He should be back in about an hour. I can pass along a message if you want.

Roadmap

  • TLS 1.3 support (OpenSSL 3.x)
  • SASL PLAIN authentication
  • Claude AI integration (/AI command — 7 subcommands)
  • Fun tools (12 commands: /RAINBOW, /CRYPTO, /WEATHER, /DICE, /MATRIX, etc.)
  • Channel operations suite (19 commands: /MASSOP, /KICKBAN, /GUARD, /AUTOOP, etc.)
  • Security hardening (57+ sprintf/strcpy fixes, CVE patch)
  • IRC services flood protection whitelist (NickServ, ChanServ, etc.)
  • GitHub Actions CI
  • Dockerfile
  • Async AI calls (non-blocking — currently freezes during AI response)
  • IRCv3 capability negotiation (message-tags, server-time, account-tag)
  • UTF-8 support
  • 256-color / true-color terminal support
  • Modern build system (CMake or Meson)
  • Snap/PPA packaging (sudo apt install bitchx)

Why BitchX?

Because IRC has been running since 1988 and nobody owns it. No algorithms. No ads. No age verification. No terms of service. Just text, moving at the speed of thought, in a terminal that looks like the future imagined by the past.

BitchX was the client that made IRC feel dangerous and exciting. This fork keeps that energy alive — and gives it a brain.

History

BitchX was created by panasync (Colten Edwards) in 1995 as a script pack for ircII, evolving into the most popular terminal IRC client of its era. It was abandoned around 2004. This fork picks up where it left off, with respect for the original work and an eye toward the future.

Contributing

Pull requests welcome. Whether you're fixing a sprintf, adding IRCv3 support, or building something nobody's thought of yet — jump in.

License

BSD License — see COPYRIGHT for details.

Original authors: Colten Edwards (panasync) and contributors (1995-2012). Modernization & AI integration: Erik Anderson (2026).

About

BitchX IRC Client — Modernized. The legendary terminal IRC client, updated for 2026. TLS 1.3, SASL auth, security hardened.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors