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 (4)

Collapse
 
madeburo profile image
Made Büro

This is really cool. AI AWAY is such a great idea!

Modernized IRC client would already be interesting on its own, but mixing that with AI features in a way that still feels natural makes it even better, I think.

Good luck with the project!

Collapse
 
numbpill3d profile image
v. Splicer

Dude... this is legendary. Wow. I feel like I am early to something that is huge. First star on github... I feel like back in the day, when threads would be posted on forums and ppl would rush to comment "FIRST!" (do kids still do that? i hope the kids still do that.)

this is amazing. i was not a IRC user back in the day but only recently have i started to use it- i beleive this will be my daily driver/irc client of choice. thank you for reviving something with so much style. this really polishes up the idea of what IRC could be to me. call me vain, but aesthetics are everything... LOL. ascii splash screen FTW. very well done, my friend.

Collapse
 
ketutdana profile image
Ketut Dana • Edited

BitchX is a legend. It's actually one of the inspirations behind a project I'm currently developing called XtermChat.

It’s a terminal-first chat system, but I’ve added a web-based GUI for better accessibility. The goal is to keep it lightweight enough to run on a cheap VPS while giving admins full control over group channels. Think of it as a modern take on the IRC experience but with a hybrid interface.

dev.to/ketutdana/xtermchat-a-termi...

Collapse
 
copyleftdev profile image
Mr. 0x1

This is wonderful, I have fond memories of IRC and BitchX