Skip to content

FlorentBelotti/42_cursus_ft_irc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42_cursus_irc---------------------------------------------------

C++

Client---------------------------------------------------

Hexchat: https://github.com/hexchat/hexchat

Summary---------------------------------------------------

Introduction---------------------------------------------------

The IRC project is about creating a simple IRC server that can handle multiple clients, channels, and basic IRC commands. This project helps in understanding network programming, socket handling, and the IRC protocol by implementing a functional IRC server.

Mandatory Part---------------------------------------------------

Your IRC server must implement the following features:

  • Handle multiple clients simultaneously.
  • Support basic IRC commands: NICK, USER, JOIN, PART, PRIVMSG, QUIT.
  • Manage multiple channels and allow clients to join and leave channels.
  • Broadcast messages to all clients in a channel.
  • Handle private messages between clients.

Bonus Part---------------------------------------------------

Your IRC server must implement the following features:

  • Implement a bot that responds to specific commands (e.g., !hello).
  • Support file transfers using the DCC protocol.

Code Overview---------------------------------------------------

Server

The server part of the IRC project includes the following files:

  • server.cpp: Main server logic, including client handling and command processing.
  • serverSocket.cpp: Functions for setting up and managing sockets and epoll events.
  • serverCommand.cpp: Functions for handling IRC commands.

Client

The client part of the IRC project includes the following files:

  • client.cpp: Client class implementation, including command handling and message sending.
  • clientCommand.cpp: Functions for handling client-specific commands.

Channel

The channel part of the IRC project includes the following files:

  • channel.cpp: Channel class implementation, including client management and message broadcasting.

Bot

The bot part of the IRC project includes the following files:

  • bot.cpp: Bot class implementation, including command handling and message responding.

Execution Breakdown---------------------------------------------------

For this project, we divided the execution into several main parts:

  1. Server Setup:

    Setting up the server involved configuring sockets, managing epoll events, and handling client connections. This part required a solid understanding of network programming and socket handling.

  2. Command Handling:

    Implementing the IRC commands required careful parsing and processing of client messages. We implemented commands such as NICK, USER, JOIN, PART, PRIVMSG, and QUIT.

  3. Channel Management:

    Managing channels involved handling client joins and leaves, broadcasting messages to all clients in a channel, and maintaining a list of active channels.

  4. Bot Implementation:

    We implemented a simple bot that responds to specific commands such as !hello. The bot was designed to join channels and interact with clients based on predefined commands.

  5. File Transfer:

    Implementing file transfer using the DCC protocol was a challenging task. It required setting up a separate socket for the file transfer and ensuring reliable data transmission between clients.

Conclusion---------------------------------------------------

Overall, the IRC project was a valuable learning experience that provided a deep understanding of network programming and the IRC protocol. It was a challenging project that required careful planning, thorough testing, and effective collaboration. The skills and knowledge gained from this project will be invaluable in future endeavors.

Thanks---------------------------------------------------

To ThomasRibalta : who provided guidance on the use of Hexchat.

To Nargin : who provided guidance on the project structure.

To Romlamb : my mate who supported me for the entire project.

Releases

No releases published

Packages

No packages published