IRC Server Project
Summary
This project involves creating your own IRC (Internet Relay Chat) server in C++. You will use an actual IRC client to connect to your server and test its functionality. IRC is a text-based communication protocol that enables real-time messaging, which can be public or private, and allows users to exchange direct messages and join group channels.
Mandatory Features
- Program name:
ircserv - Arguments:
<port>(the port on which your IRC server will listen),<password>(the connection password for clients). - Requirements:
- Handle multiple clients simultaneously without hanging.
- Use non-blocking I/O operations with only one poll() (or equivalent).
- No forking allowed.
- Communication must be done via TCP/IP (IPv4 or IPv6).
- The following IRC commands must be implemented:
- Authenticate, set a nickname, set a username, join a channel, send/receive private messages.
- Forward channel messages to all clients in the channel.
- Implement operator-specific commands:
- KICK: Eject a client from the channel.
- INVITE: Invite a client to the channel.
- TOPIC: Change or view the channel's topic.
- MODE: Modify the channel's modes (i, t, k, o, l).
How to Run the Project
- Clone the Repository:
git clone git@github.com:ADILRAQ/Ft_irc-42-cursus.git
cd Ft_irc-42-cursus
- Compile the Project:
Run the Makefile to compile the source code:
bash make
- Run the IRC Server:
Launch the IRC server with the following command:
```bash
./ircserv <port> <password>
```
> Replace <port> with the desired port number and <password> with the connection password for clients.
- Test the Server:
Use an IRC client of your choice to connect to the server, but preferable to use LimeChat:
```bash
/connect 127.0.0.1 <port>
/pass <password>
```
Testing with
nc(Netcat):A simple test can be done using nc:
nc 127.0.0.1 <port>
- Send partial data commands using
ctrl+Dto simulate various scenarios:
com^Dman^Dd
Log in or sign up for Devpost to join the conversation.