Skip to content
/ ft_irc Public

Simple IRC Server implementation written in C++

Notifications You must be signed in to change notification settings

toagne/ft_irc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

157 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft_irc

A minimal IRC-like server implementation written in C++, designed to support multiple clients connecting concurrently and communicating through standard IRC commands.

Features

  • TCP Socket Server
    • Listens for incoming client connections using non-blocking sockets and the poll() system call.
  • Multi-Client Support
    • Handles multiple simultaneous connections without threading, using event-driven I/O.
  • Command Parsing
    • Supports a subset of IRC commands such as PASS, NICK, USER, JOIN, PRIVMSG, PAR, KICK, INVITE, and QUIT.
  • Channel Management
    • Clients can create and join channels, send private or group messages, and set channel topics.
  • User Authentication
    • Implements password protection for server access (defined at startup).
  • Graceful Disconnects
    • Properly handles client exits, timeouts, and broken connections.

How It Works

  • Initialization
    • The server is launched with a port and password. It initializes a listening socket and enters the main event loop.
  • Connection Handling
    • New connections are accepted and registered to a list of file descriptors monitored by poll().
  • Command Handling
    • Incoming messages are parsed into commands, and handlers are invoked accordingly.
  • Broadcasting
    • Messages are distributed to appropriate recipients based on channel membership or target nicknames.

About

Simple IRC Server implementation written in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •