FT_IRC is an IRC (Internet Relay Chat) server implementation that allows users to connect to the server using an IRC client and communicate with each other using channels and direct messaging in real-time, by using sockets.
- IRC Protocol Overview
- Internet Relay Chat (IRC) - Wikipedia
- "IRC - Things to know" by a 42 student
- ChatGPT to quickly digest all of the above !
make
will generate the executable. The Makefile handles relink, header dependencies and places objects in a /build folder.- The usage is
./ircserver <port> <password>
, butpassword
authentication isn't implemented yet. - Once the server is running in a terminal, open another terminal and enter
nc <ipaddr> <port>
, followed by whatever you want to send requests to the server, command parsing isn't implemented yet.irssi
will not be able to send requests to your ircserver until parsing is implemented, but you can still connect by using/connect <ipaddr> <port>
inside the client.ipaddr
will always belocalhost
, butport
can be any free port. - To exit the server, you can hit
Ctrl + C
and the program will cleanly exit, however later on the only ways to exit the server will be sending aSIGTERM
from another terminal or typing/exit
.
For a detailed visualization of the FT_IRC server project, you can refer to the Miro board.
The IrcServer
class represents the core of the FT_IRC server. It handles client connections, message processing, and user management. The server listens for incoming connections, establishes data sockets with clients, and responds to IRC commands. The server uses the poll(or equivalent) system call for efficient event handling and non-blocking I/O so we can serve multiple clients at once.
The Channel
class represents an IRC channel, where users can join and exchange messages. The class manages the users in the channel, broadcasts messages to all users, and handles channel-specific commands.
The User
class represents an IRC user connected to the server. It stores user-specific information, such as nickname and connection status. Users can join channels, send and receive messages, and interact with other users on the server.
For this project I recommend settings weekly goal-oriented sprints and working on feature-branches. Once a feature is implemented and fully tested and functional, it can be merged onto the main branch.