Skip to content

igordotdev/irc_server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot From 2025-12-01 14-11-21 Screenshot From 2025-12-01 14-12-25

Halloy IRC Server 💬

A robust and efficient IRC (Internet Relay Chat) server implementation, designed for handling multiple clients and channels. This project provides a foundation for building your own chat application or understanding the inner workings of IRC servers. It supports essential IRC features like user authentication, channel management, and message handling.

🚀 Key Features

  • Multi-Client Support: Handles numerous concurrent client connections efficiently using poll for I/O multiplexing.
  • Channel Management: Allows creation, joining, and management of multiple channels.
  • User Authentication: Implements password-based authentication for clients.
  • Message Handling: Supports sending and receiving messages between clients and channels.
  • Command Processing: Parses and executes standard IRC commands (e.g., NICK, JOIN, PRIVMSG).
  • Configuration: Uses a TOML file (config.toml) for easy server configuration, including server details, authentication, and channel settings.
  • Signal Handling: Gracefully handles signals (SIGINT, SIGQUIT) for clean server shutdown.
  • Formatted Output: Uses Outline.hpp for visually appealing console output.

🛠️ Tech Stack

  • Language: C++
  • Networking: Sockets (TCP)
  • I/O Multiplexing: poll
  • Configuration: TOML (config.toml)
  • Data Structures: std::string, std::vector, std::set
  • Operating System: Linux (developed and tested on Linux / WSL2)
  • Build System: c++ (GCC)

📦 Getting Started / Setup Instructions

Prerequisites

  • A c++ (GCC) compiler
  • Make

Installation

  1. Clone the repository:

    git clone https://github.com/MatriX1232/ft_irc.git
    cd ft_irc
  2. Install Dependencies (Example using apt on Debian/Ubuntu):

    sudo apt update
    sudo apt install build-essential

    Note: You may need to install a TOML parsing library separately depending on your system and chosen library.

  3. Build the project:

    make

Running Locally

  1. Configure the server:

    • Edit the config.toml file to set the desired port, password, and other server settings. Important Security Note: Avoid storing sensitive information like passwords in plain text. Consider using environment variables or a more secure configuration management approach in a production environment.
  2. Run the server:

    ./ircserv <port> <password>

    Replace <port> and <password> with the port number and password you configured in config.toml or desire to use.

💻 Usage

After starting the server, you can connect to it using an Halloy IRC client.

  1. Configure your IRC client:

    • Set the server address to localhost or the IP address of the server.
    • Set the port to the port number you configured in config.toml.
    • Enter the server password when prompted.
    • Set your desired nickname, username, and real name.
  2. Join channels:

    • Use the /join <channel_name> command to join a channel. For example, /join #general.
  3. Send messages:

    • Type your message in the chat window and press Enter to send it to the current channel.
    • Use /msg <nickname> <message> to send a private message to another user.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A multi-client IRC server compliant with RFC 1459.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 97.0%
  • Makefile 2.3%
  • Shell 0.7%