ft_irc
A fully functional Internet Relay Chat (IRC) server written in C++98, capable of handling multiple concurrent clients, channels, and operators.
2022-03-01
low-levelOpen GitHub

ft_irc
An IRC server written in C++98 that handles multiple clients simultaneously over a single non-blocking event loop. Any standard IRC client works with it: irssi, WeeChat, HexChat. Clients authenticate with a password, join channels, and communicate in real time.
No forking. Everything runs in one process through poll().
Features
- Non-blocking I/O with a single
poll()loop for all connected clients - Password authentication on connect
- Full channel management:
JOIN,PART,TOPIC,KICK,INVITE,MODE - Private messaging with
PRIVMSGandNOTICE - Operator commands: kick users, set modes, manage topics
- Built-in bot with
!time,!help, and!topiccommands
Channel modes
| Mode | What it does |
|---|---|
| +i | Invite-only |
| +t | Only operators can change the topic |
| +k | Password-protected channel |
| +l | User count limit |
| +o | Grant or revoke operator status |
Technical notes
All sockets are non-blocking. Partial reads and writes are handled gracefully. Messages are buffered per client until a full \r\n-terminated line arrives. Written in C++98, no modern features.
Usage
make
./ircserv 6667 mysecretpassword
# Connect with irssi
/connect localhost 6667 mysecretpassword
/nick mynick
/join #generalSCREENSHOTS // 01 FRAMES

01 / 01