Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛰️ ft_irc – Internet Relay Chat Server

📌 Project Overview

ft_irc is a C++98 implementation of an IRC (Internet Relay Chat) server.
The goal of this project was to dive deep into network protocols, socket programming, and non-blocking I/O by building a custom IRC server that communicates with standard IRC clients.

IRC (Internet Relay Chat) is one of the oldest real-time messaging protocols, supporting channels, private messaging, and operators. This project helped me understand how Internet protocols work at a low level while practicing clean, efficient, and standard-compliant C++ coding.


🛠️ Features Implemented

  • Handle multiple simultaneous clients with non-blocking I/O.
  • Client authentication using nickname and username.
  • Join and manage channels with message broadcasting.
  • Private messaging between users.
  • Support for channel operators with commands:
    • KICK → Remove a user from a channel
    • INVITE → Invite a user to a channel
    • TOPIC → View or update a channel’s topic
    • MODE → Manage channel modes (invite-only, topic restriction, password, operator privileges, user limits).

⚙️ Technical Details

  • Language: C++98 (mandatory for the project).
  • Compilation: c++ -Wall -Wextra -Werror -std=c++98.
  • I/O Handling: poll() (or equivalent like select(), kqueue(), epoll()).
  • Protocol: TCP/IP (IPv4 or IPv6).
  • Restrictions:
    • No forking.
    • No external libraries or Boost.
    • Clean, stable codebase required.

🚀 Usage

🔧 Compilation

make

▶️ Run the server

./ircserv <port> <password>
  • <port> → The port number the server will listen on.
  • <password> → Password required for clients to connect.

Example:

./ircserv 6667 mypass123

💻 Testing

Using nc (netcat):

nc -C 127.0.0.1 6667

You can manually send IRC commands like:

NICK user1
USER user1 0 * :Real Name
JOIN #general
PRIVMSG #general :Hello everyone!

Using an IRC client:

Connect your favorite IRC client (e.g., HexChat, irssi) to test the server.


🎯 Learning Outcomes

From this project, I gained knowledge in:

  • Network protocols (TCP/IP, sockets, polling).
  • Real-time server-client communication.
  • Non-blocking I/O and multiplexing with poll().
  • Writing robust C++ code under strict constraints (C++98, no external libs).
  • Implementing standard IRC features and understanding the fundamentals of chat systems.

👤 Author

Mohamed Amzil

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages