Skip to content

AI3I/pyIRCX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyIRCX

A production-ready Python implementation of the IRCX protocol — the modern IRCX server for distributed chat networks

Python 3.8+ License: GPL v3 Version Tests


What is pyIRCX?

pyIRCX is a production-ready IRCX chat server built on Python's asyncio framework. It faithfully recreates — and significantly enhances — the functionality of Microsoft Exchange Chat Service (MECS 5.5 and 6.0), the technology that powered legendary chat networks like:

  • MSN Chat (irc.msn.com) — Microsoft's flagship chat service, serving millions daily from 1996-2006
  • TalkCity — One of the largest chat communities of the late 90s, pioneering web-based chat
  • Enterprise Exchange Chat — Corporate deployments before Slack and Teams existed

If you remember the days of Microsoft Comic Chat, chat rooms with real nickserv-style registration, channel properties, and the unique IRCX extensions — pyIRCX brings all of that back with modern security, scalability, and reliability.

Comic Chat Compatible! pyIRCX works with Microsoft Comic Chat (V2.5), the iconic IRC client that displayed conversations as comic strips. Run it natively or in a VM - pyIRCX speaks the same IRCX protocol.


Recent Updates

Version 1.0.4 (January 2026)

License Migration to GPLv3

  • Open Source Forever — Migrated from MIT to GNU General Public License v3.0
  • Enhanced Protections — GPLv3 ensures derivatives remain open source with patent protection
  • Updated Copyright — Standardized to "pyIRCX Project" across all source files
  • Comprehensive Headers — All Python files now include full GPLv3 license headers
  • Documentation Updates — All references and badges updated to reflect GPLv3

Version 1.0.3 (January 2026)

Cockpit Enhancements & Security Fixes

  • Staff Management — Full CRUD interface for managing ADMIN/SYSOP/GUIDE accounts
  • Enhanced Statistics — Detailed server stats with staff breakdowns and access rule counts
  • Channel Modes Display — Active channels now show modes (+nt, +mnst, etc.)
  • Mode Security Fix — Prevented manual setting of +r (registered) mode on channels
  • UI Improvements — Reorganized dashboard with better information hierarchy

Version 1.0.0 (January 2026)

Server-to-Server Linking

pyIRCX now supports distributed chat networks with server-to-server linking:

  • Server linking protocol with password authentication
  • State synchronization - users and channels sync across servers
  • Message routing - seamless communication across the network
  • Netsplit handling - graceful recovery from server disconnections
  • Admin commands - CONNECT, SQUIT, LINKS for network management

Use Cases

Distributed Chat Networks

Build multi-server IRC networks spanning geographic regions:

  • Link servers in different cities/countries for low latency
  • Scale horizontally by adding more servers
  • Provide redundancy with multiple hubs
  • Manage the network with standard IRC server commands

Community Chat Networks

Build your own chat community with MSN Chat-style features including channel cloning for busy rooms, nickname registration, channel ownership, and automated moderation tools.

Retro Computing & Preservation

pyIRCX provides protocol-correct IRCX for historical accuracy and works with period-accurate clients:

  • Microsoft Comic Chat (cchat.exe) - The comic strip chat client
  • Microsoft Chat 2.5 - The standard IRCX client
  • mIRC with IRCX scripts - Extended functionality
  • Any RFC 1459/2812 client - Full backwards compatibility

Enterprise & Team Communication

Self-hosted team chat with corporate-grade features:

  • Staff hierarchy (ADMIN/SYSOP/GUIDE)
  • Channel access control (ACCESS lists)
  • Audit logging (transcripts)
  • No external dependencies or subscriptions
  • Multi-server deployment for large organizations

Gaming Communities

Dedicated chat infrastructure for game servers, guilds, and gaming communities:

  • ServiceBot automated moderation
  • Flood protection and spam filtering
  • Channel properties for rules/info
  • Distributed network for global player base

Education & Research

Study the IRCX protocol, teach network programming, or research distributed chat system architecture with a well-documented, readable Python implementation.


Why pyIRCX?

The Only Open-Source IRCX Server with Server Linking

pyIRCX offers feature parity with commercial IRCX servers like OfficeIRC, but as open-source software you can deploy anywhere. While OfficeIRC supports both IRCX and server linking, it's commercial/closed-source. UnrealIRCd and other major IRC servers support linking but lack IRCX protocol extensions.

pyIRCX is the only open-source server combining full IRCX protocol support with server-to-server linking capabilities.

See detailed feature comparison below.


Features

🌐 Server Linking & Distributed Networks (NEW!)

Build IRC networks that scale:

  • Server-to-Server Protocol — Custom IRCX-aware linking protocol
  • Authentication — Password-protected server links
  • State Burst — Full user/channel synchronization on link
  • Message Routing — Efficient message propagation across the network
  • Netsplit Handling — Automatic cleanup and recovery
  • Admin Commands:
    • CONNECT <server> — Link to a remote server
    • SQUIT <server> — Disconnect a linked server
    • LINKS — Show network topology
  • Collision Detection — Timestamp-based nick collision resolution
  • Configurable — Link configuration via JSON config file

Example Network Topology:

         hub.example.com (Central Hub)
                 |
    +------------+------------+
    |            |            |
  leaf1      leaf2        leaf3
(US-East)  (US-West)    (Europe)

IRCX Protocol Extensions

pyIRCX implements the full IRCX specification developed by Microsoft:

  • Three-tier channel privileges: Owner (.), Host (@), Voice (+)
  • ACCESS command: Granular access control lists (DENY, GRANT, VOICE, HOST, OWNER)
  • PROP command: Channel properties (TOPIC, ONJOIN, ONPART, MEMBERKEY, HOSTKEY, OWNERKEY, LAG)
  • WHISPER command: Private messages within channels
  • LISTX command: Extended channel listing with metadata
  • KNOCK command: Request invitation to invite-only channels
  • CREATE command: Create channels with initial modes
  • ISIRCX command: Protocol capability detection

Channel Cloning (Overflow Rooms)

Just like the original MSN Chat, pyIRCX supports automatic channel cloning:

#Lobby (50 users, +dl 50)  →  #Lobby1 (50 users)  →  #Lobby2 (37 users)

When a channel with clone mode (+d) reaches its user limit (+l), new joiners automatically get placed in numbered overflow channels. Mode changes on the original propagate to all clones.

Security & Authentication

  • SASL PLAIN authentication with IRCv3 capability negotiation
  • Nickname registration with email verification
  • Two-factor authentication support
  • DNSBL checking (Spamhaus, DroneBL, etc.)
  • Open proxy detection
  • Connection throttling and flood protection
  • Failed auth lockout with configurable thresholds
  • TLS 1.2/1.3 with automatic certificate management
  • IP masking (+x user mode)

Network Services

Built-in service bots that can be invited to channels for moderation:

  • System — Server announcements and administrative messages
  • Registrar — Handles nickname registration and authentication
  • Messenger — Offline messaging / memo service
  • NewsFlash — Network-wide announcements
  • ServiceBots — Configurable monitoring bots for content filtering

Staff Management

Three-tier staff hierarchy matching the original MECS design:

Level Mode Capabilities
ADMIN +a Full server control, CONFIG access, can promote SYSOPs, can link servers
SYSOP +o Server operator, can KILL/KLINE, promote GUIDEs, can link servers
GUIDE +g Channel moderation assistance, limited staff commands

Modern Infrastructure

  • Pure Python 3.8+ with asyncio for high concurrency
  • SQLite database with connection pooling for persistence
  • Dual-stack IPv4/IPv6 support out of the box
  • Systemd integration for production deployments
  • Hot-reloadable configuration
  • Comprehensive logging with configurable verbosity
  • Web admin panel via Cockpit integration (optional)

Technical Deep Dive

Async Architecture

pyIRCX is built from the ground up on Python's asyncio framework, enabling efficient handling of thousands of concurrent connections without threading overhead:

# Non-blocking I/O for all client operations
async def handle_client(self, reader, writer):
    # Each client runs in its own coroutine
    # No thread pools, no blocking, pure async
  • Event-driven command dispatch — Commands are processed asynchronously with per-command rate limiting
  • Coroutine-per-client model — Each connection is an independent async task
  • Non-blocking database operations — All SQLite queries use aiosqlite for async I/O
  • Server linking — Async server-to-server communication with message routing

Server Linking Architecture

The linking system enables distributed IRC networks:

┌─────────────────────────────────────────────────────────────┐
│  Server Linking Protocol                                     │
├─────────────────────────────────────────────────────────────┤
│  1. Handshake          — SERVER command with authentication  │
│  2. State Burst        — Sync all users and channels         │
│  3. Message Routing    — Propagate messages across network   │
│  4. Collision Handling — Timestamp-based nick resolution     │
│  5. Netsplit Recovery  — Automatic cleanup and rejoins       │
└─────────────────────────────────────────────────────────────┘

Protocol Features:

  • Password-authenticated server connections
  • Full state synchronization on link establishment
  • Efficient message routing with loop prevention
  • Automatic netsplit detection and cleanup
  • Nick/channel timestamp collision resolution

Database Layer

Persistent storage with enterprise-grade reliability:

  • Connection pooling — Configurable pool size (default: 5 connections) eliminates connection overhead
  • Automatic schema migration — Database structure updates seamlessly between versions
  • Atomic transactions — All multi-step operations are transaction-safe
  • Stored data includes:
    • Registered nicknames with bcrypt-hashed passwords
    • Channel registrations with ACCESS lists and PROPs
    • Offline messages (memos) with expiration
    • Staff credentials and privilege levels
    • Server access rules (bans) with expiration timestamps

Multi-Layer Security

pyIRCX implements defense-in-depth with multiple security layers:

Connection Security

┌─────────────────────────────────────────────────────────────┐
│  Incoming Connection                                         │
├─────────────────────────────────────────────────────────────┤
│  1. Connection Throttle    — Max N connections/IP/window     │
│  2. DNSBL Check            — Query Spamhaus, DroneBL, etc.   │
│  3. Proxy Detection        — Scan for open proxy ports       │
│  4. Connection Scoring     — Aggregate risk score            │
│  5. TLS Handshake          — TLS 1.2/1.3 with modern ciphers │
│  6. Rate Limiting          — Per-command cooldowns           │
│  7. Flood Protection       — Message frequency limits        │
└─────────────────────────────────────────────────────────────┘

DNSBL Integration

  • IPv4 and IPv6 support — Full nibble-reversed IPv6 DNSBL queries
  • Multiple blocklist support — Configure any DNSBL (Spamhaus ZEN, DroneBL, etc.)
  • Whitelist bypass — Exempt trusted IPs/ranges from checks
  • Async DNS resolution — Non-blocking blocklist queries

Authentication Security

  • bcrypt password hashing — Industry-standard password storage
  • Failed attempt lockout — Configurable threshold and duration
  • SASL PLAIN over TLS — Secure credential transmission
  • MFA support — Two-factor authentication via verification codes

Performance Characteristics

Metric Value
Concurrent connections 1,000+ per server
Network scalability Unlimited (add more servers)
Message throughput Limited by network I/O
Memory per connection ~50KB typical
Database operations Pooled, non-blocking
Server link latency <10ms (LAN), varies (WAN)
Startup time <1 second

Quick Start

Installation

# Clone the repository
git clone https://github.com/AI3I/pyIRCX.git
cd pyIRCX

# Automated installation (recommended)
sudo ./install.sh

# OR manual installation
pip install aiosqlite bcrypt pyotp cryptography
python3 pyircx.py

The server will start listening on ports 6667 (plain) and 7000 (alternative) by default.

Upgrading

# Pull latest changes
cd pyIRCX
git pull

# Upgrade existing installation
sudo ./upgrade.sh

Maintenance

# Validate and repair installation
sudo ./repair.sh

# Uninstall completely
sudo ./uninstall.sh

Basic Configuration

Edit pyircx_config.json to customize your server:

{
  "server": {
    "name": "irc.example.com",
    "network": "MyNetwork"
  },
  "network": {
    "listen_ports": [6667, 7000]
  }
}

Setting Up Server Linking

To create a multi-server network:

1. Configure the hub server (hub.example.com):

{
  "linking": {
    "enabled": true,
    "bind_host": "0.0.0.0",
    "bind_port": 7001,
    "links": [
      {
        "name": "leaf.example.com",
        "host": "leaf.example.com",
        "port": 7001,
        "password": "secure-link-password",
        "autoconnect": false
      }
    ]
  }
}

2. Configure leaf servers similarly with hub details

3. Link servers as an admin:

/STAFF LOGIN <username> <password>
/CONNECT <servername>
/LINKS

See LINKING.md for complete server linking documentation.

SSL/TLS Setup (Recommended)

Quick automated setup:

sudo ./setup_ssl.sh

Choose from:

  • Let's Encrypt - Free, trusted certificates with auto-renewal
  • Self-signed - For testing/internal use
  • Existing certificate - Use your own certificate files

The script automatically:

  • Obtains and installs certificates
  • Configures pyIRCX
  • Sets up auto-renewal (Let's Encrypt)
  • Restarts the server

Connecting

Connect with any IRC client:

# Plain connection
/server localhost 6667

# SSL/TLS connection (after setup)
/server localhost 6697

For IRCX features, use the IRCX command after connecting:

/QUOTE IRCX

Documentation


Testing

pyIRCX includes comprehensive test suites to ensure protocol compliance:

# Start the server
python3 pyircx.py &

# Run user protocol tests (50 tests)
python3 pyIRCX_test_users.py

# Run server linking tests (4 tests)
python3 pyIRCX_test_linking.py

Test Coverage:

  • 50 User/IRC Tests — All IRC/IRCX protocol features
  • 4 Linking Tests — Server linking functionality
  • Total: 54 tests, 100% passing

See TEST_RESULTS.md for detailed test results.


Deployment

Systemd Service

pyIRCX includes systemd integration for production deployment:

# Install as a system service
sudo cp pyircx.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable pyircx
sudo systemctl start pyircx

# View logs
sudo journalctl -u pyircx -f

Docker Deployment

FROM python:3.9-slim
WORKDIR /app
COPY . .
RUN pip install aiosqlite bcrypt pyotp
CMD ["python3", "pyircx.py"]

Web Admin Panel (Cockpit)

Optional web-based administration:

# Install Cockpit
sudo dnf install cockpit

# Copy pyIRCX module
sudo cp -r cockpit/pyircx ~/.local/share/cockpit/

# Access at https://yourserver:9090

The web admin provides:

  • Real-time server monitoring
  • User/channel management
  • Configuration editing
  • Log viewing
  • Staff account management

Historical Context

The IRCX Legacy

IRCX (Internet Relay Chat eXtensions) was developed by Microsoft in the late 1990s as an enhancement to the standard IRC protocol. It was first implemented in Microsoft Exchange Server 5.5 as the Chat Service component, replacing the older binary Microsoft Chat protocol.

The protocol powered some of the largest chat networks of the era:

  • MSN Chat served millions of users daily at its peak
  • TalkCity was one of the pioneering web chat communities
  • Countless enterprise deployments for internal communications

When TalkCity ceased its original operations in 2002 and Microsoft shut down MSN Chat in 2006, the IRCX protocol largely faded from public use — but not from memory.

Preserving Chat History

pyIRCX was created to preserve this important piece of internet history. Whether you're:

  • Nostalgic for the TalkCity or MSN Chat era
  • Running a retro computing project
  • Need a fully-featured IRC server with modern enhancements
  • Want to understand how enterprise chat worked before Slack
  • Building a distributed IRC network

pyIRCX provides an authentic IRCX experience on modern infrastructure.


Comparison with Other Servers

Comprehensive comparison of pyIRCX with major IRC server implementations:

Feature/Server pyIRCX OfficeIRC UnrealIRCd InspIRCd Solanum ircu bahamut ratbox ngIRCd Ergo ircd-hybrid
Language Python .NET C C++ C C C C C Go C
IRCX Protocol
Server Linking
ACCESS Control
PROP Properties
Channel Cloning
Comic Chat
Built-in NickServ ❌* ❌* ❌* ❌* ❌* ❌* ❌* ❌*
Built-in ChanServ ❌* ❌* ❌* ❌* ❌* ❌* ❌* ❌*
Network Services
SASL Auth
IPv6 Support
Transcript Logging
Single-File Deploy
Web Admin
Open Source
Cost Free Commercial Free Free Free Free Free Free Free Free Free

* Requires external services package (Anope or Atheme)

Network Associations:

  • Solanum - Libera.Chat
  • ircu - Undernet (P10 protocol)
  • bahamut - DALnet
  • ratbox - EFnet (TS6 protocol)
  • ircd-hybrid - EFnet
  • ngIRCd - Lightweight/portable

pyIRCX is the only open-source server combining full IRCX protocol support with server-to-server linking capabilities.


Production Deployments

pyIRCX is production-ready and suitable for:

Small Communities (10-100 users) — Single server deployment

Medium Networks (100-1,000 users) — 2-3 linked servers

Large Networks (1,000+ users) — Multi-server distributed network

Enterprise Deployments — Secure internal chat with staff hierarchy

Retro Projects — Authentic IRCX for vintage client compatibility

Who Should Use pyIRCX?

pyIRCX is ideal for:

  • Retro computing enthusiasts preserving IRCX protocol history
  • Gaming communities needing dedicated chat infrastructure
  • Organizations wanting self-hosted team communication
  • IRC network operators building distributed chat networks
  • Researchers studying IRCX protocol implementation

Using pyIRCX in production? Let us know via GitHub issues!


Contributing

Contributions are welcome! Whether it's:

  • Bug fixes
  • New features
  • Documentation improvements
  • Test cases
  • Protocol compliance improvements

Please open an issue or pull request on GitHub.

Development Setup

# Clone the repository
git clone https://github.com/AI3I/pyIRCX.git
cd pyIRCX

# Install dev dependencies
pip install aiosqlite bcrypt pyotp

# Run tests
python3 pyIRCX_test_users.py
python3 pyIRCX_test_linking.py

# Check code
python3 -m py_compile pyircx.py linking.py

License

GNU General Public License v3.0 — See LICENSE for details.


Acknowledgments

  • The Microsoft Exchange Chat team for creating IRCX
  • The TalkCity community for years of memories
  • The IRC protocol designers (RFC 1459, RFC 2812)
  • Everyone keeping classic chat protocols alive
  • All contributors to this project

Support


Keywords

For searchability: IRC server, IRCX server, IRCX protocol, Microsoft Exchange Chat, MECS, MSN Chat server, MSN Chat clone, TalkCity, Comic Chat server, Microsoft Comic Chat, chat server Python, asyncio IRC, self-hosted chat, open source IRC server, IRC with registration, NickServ alternative, ChanServ alternative, SASL IRC, channel cloning, overflow rooms, IRC flood protection, DNSBL IRC, IRC access control, enterprise chat server, team chat self-hosted, Slack alternative self-hosted, Discord alternative self-hosted, retro chat, vintage IRC, 90s chat, web chat server, IRC network, server linking, distributed IRC, IRC hub, IRC services, UnrealIRCd alternative, InspIRCd alternative


Bringing back the chat rooms of yesterday, with the technology of today.

pyIRCX 1.0.4 — The production-ready IRCX server for distributed networks

Star this project on GitHub if you find it useful!