DEV Community

Erik anderson
Erik anderson

Posted on • Originally published at github.com

I Modernized BitchX — The Legendary 90s IRC Client Now Has AI Built In

BitchX is Back

If you were on IRC in the late 90s or early 2000s, you know BitchX. It was THE terminal IRC client. The ASCII art splash screen. The split windows. The built-in scripting engine. The attitude.

It was abandoned around 2004. The last real commit was years ago. The SSL implementation used SSLv23_client_method() which was removed from OpenSSL 3.x. The codebase had over 1,200 unsafe sprintf/strcpy calls. It couldn't connect to modern IRC networks.

I fixed all of that. And then I did something nobody expected — I built Claude AI directly into it.

What I Changed

Starting from the BitchX 1.3 codebase (119,286 lines of C), here's what's been modernized:

Security:

  • Replaced SSLv23_client_method()TLS_client_method() (OpenSSL 3.x)
  • Fixed a remote DoS vulnerability in CTCP UTC parsing
  • Converted 57+ sprintfsnprintf in network-facing code
  • Replaced bzeromemset, bcopymemcpy, inet_addrinet_pton
  • Fixed SASL authentication memory leak
  • Fixed command injection vulnerability in the AI module

Features:

  • SASL PLAIN authentication (connect to Libera.chat, OFTC, DALnet properly)
  • TLS 1.3 connections to modern IRC networks
  • Claude AI integration via /AI command (see below)
  • GitHub Actions CI pipeline
  • Multi-stage Dockerfile

The AI Commands

This is where it gets interesting. BitchX now has Claude built in:

/AI what is the meaning of life     — Ask Claude anything
/AI SAY tell them about Bitcoin     — Claude generates a message, sends it to channel
/AI REPLY                           — Contextual reply based on last 20 lines of chat
/AI SUMMARIZE                       — Summarize the last 50 lines
/AI TRANSLATE Spanish               — Translate the last message
/AI AWAY playing Elden Ring         — AI responds to PMs while you're away
Enter fullscreen mode Exit fullscreen mode

The /AI AWAY feature is my favorite. You set a context ("playing Elden Ring, back later") and every PM gets an AI-generated response that's contextual, natural, and mentions you'll be back. It's like having a smart auto-responder that actually understands conversation.

The implementation uses pipe()/fork()/execlp() — no shell involved, no command injection possible. Prompt input is sanitized to strip $, backticks, and control characters before being passed to Claude.

Building It

# 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)

# Run
./source/BitchX -n YourNick irc.dal.net
Enter fullscreen mode Exit fullscreen mode

Or with Docker:

docker build -t bitchx .
docker run -it bitchx -n YourNick irc.libera.chat:+6697
Enter fullscreen mode Exit fullscreen mode

Why Bother?

People ask why I'd spend time modernizing a 30-year-old IRC client when Discord and Slack exist.

Three reasons:

  1. IRC is unkillable. It's been running since 1988. No company owns it. No terms of service. No age verification. No algorithm. Just text.

  2. The aesthetic. Nothing looks or feels like BitchX in a terminal. The ASCII art, the raw speed, the hacker energy. Modern chat apps are designed for engagement metrics. BitchX was designed for people who type fast and think faster.

  3. AI + IRC is unexplored territory. 18,000+ MCP servers exist for AI tool integration. Zero of them connect to IRC. The combination of a decentralized, text-based, real-time protocol with AI capabilities opens doors that nobody's walked through yet.

What's Next

  • IRCv3 capability negotiation (message-tags, server-time)
  • UTF-8 support (requested since 2013)
  • 256-color / true-color terminal support
  • More security hardening (1,200+ unsafe calls remain)
  • Snap/PPA packaging for sudo apt install bitchx

The repo is at github.com/prime001/BitchX. PRs welcome. If you used BitchX back in the day and want to help modernize it, jump in.


I'm Erik Anderson — I build systems that run without me. Two books on Amazon (From McDonalds to Financial Freedom, The Autonomous Engineer), 25+ projects on two home servers, and now apparently an IRC client maintainer. The 90s never died — they just needed an upgrade.

Top comments (0)