How abraimi/ft_irc works
ft_irc is a C++98 IRC server. An IRC client connects over TCP, registers with PASS/NICK/USER, then sends commands for private or channel messaging and channel administration; the server returns IRC protocol replies. The main runtime is a non-blocking poll loop, with per-client state, message parsing, command dispatch, and in-memory channel membership and modes. README documents the supported command families and buffered I/O. Some source excerpts are partial, so edges are limited to shown calls or documented behavior.
Main entry points: Dispatcher.cpp Command dispatcher · Server.cpp TCP poll server · MessageException.cpp Protocol errors · Utils.cpp Wire formatting utilities
Components 13
Server runtime
- Program entry
src/main.cpp - TCP poll server
src/Server.cpp
IRC protocol
- Message parsing
src/Message.cpp - Protocol errors
src/MessageException.cpp - Wire formatting utilities
src/Utils.cpp
Command handling
- Command dispatcher
src/Dispatcher.cpp - Registration
src/Dispatcher.cpp - Channel and private messaging
src/Dispatcher.cpp - Channel administration
src/Dispatcher.cpp - CAP and PING
src/Dispatcher.cpp
Session and channels
- Client session state
src/Client.cpp - Channel state
src/Channel.cpp
Other components
- IRC client
Connections 15
- Program entry → TCP poll server: starts
src/main.cpp - IRC client → TCP poll server: connects and sends
README.md - TCP poll server → Client session state: creates and tracks
src/Server.cpp - TCP poll server → Command dispatcher: dispatches messages
src/Server.cpp - TCP poll server → Channel state: manages membership
src/Server.cpp - Command dispatcher → Registration: handles
src/Dispatcher.cpp - Command dispatcher → Channel and private messaging: handles
src/Dispatcher.cpp - Command dispatcher → Channel administration: handles
src/Dispatcher.cpp - Command dispatcher → CAP and PING: handles
src/Dispatcher.cpp - Command dispatcher → Channel state: updates channel state
src/Dispatcher.cpp - Command dispatcher → Client session state: updates session
src/Dispatcher.cpp - Command dispatcher → Protocol errors: raises command errors
src/Dispatcher.cpp - Command dispatcher → Wire formatting utilities: formats replies
src/Dispatcher.cpp - Message parsing → Protocol errors: raises validation errors
src/Message.cpp - TCP poll server → Wire formatting utilities: formats replies
src/Server.cpp