A custom IRC (Internet Relay Chat) server developed in C++98, offering real-time, text-based communication via channels and private messages. This project is perfect for exploring network protocols, non-blocking I/O, and the basics of multi-client server design in C++.
- About the Project 🚀
- Features ✨
- Prerequisites 📋
- Installation & Setup 💻
- Usage 🎮
- Learning Outcomes 📚
- License ⚖️
This project recreates the core functionality of an IRC server. Users can authenticate, choose a nickname and username, join channels, and exchange messages. The server handles multiple simultaneous connections and relays messages in real time, demonstrating how non-blocking network operations work in C++.
- Multi-Client Support: Accepts multiple concurrent connections without blocking.
- Channel System: Users can join channels, exchange public messages, and manage topics.
- Private Messaging: Supports PRIVMSG for direct communication between two users.
- Operator Commands: Enable channel operators to KICK, INVITE, and set channel MODE (e.g., invite-only, topic-restricted, user limits).
- Custom Authentication: Requires a valid password to connect, ensuring only authorized clients access the server.
- Non-Blocking I/O: Manages sockets using
poll()(or equivalent) for efficient event handling.
- C++98 Compatible Compiler
- Make (to build the project)
- No External Libraries (everything done with standard libraries and system calls)
Make sure you have these in place before compiling the project.
- Clone the Repository:
git clone https://github.com/cgermain78/irc.git cd ft_irc - Usage:
Once the server is compiled, you can run it with:
make
- (Optional) Adjust Configurations: If you have a config file or want to tweak the default port/password, you can edit a config file or pass arguments at runtime.
Once the server is compiled, you can run it with:
./ircserv <port> <password>Example Execution:
./ircserv 7776 passBy developing this project, I was able to:
- Understand Network Protocols: Gain familiarity with the socket API, event polling, and TCP communication.
- Implement Non-Blocking I/O: Use poll() (or an equivalent) to manage multiple connections simultaneously.
- Handle IRC Mechanics: Explore IRC-specific commands (JOIN, PRIVMSG, MODE, etc.) and server-client messaging flows.
- Enhance C++ Proficiency: Write structured, maintainable code while respecting C++ standards.
