How fbkeskin/42-ft_irc works
ft_irc is a multi-client TCP IRC server. A client connects, registers with PASS/NICK/USER, then issues channel and messaging commands; the server parses and dispatches requests, maintains client/channel state, and sends protocol replies. The graph covers README-documented command capabilities as well as sampled networking and state layers. Some command implementations and server sections were not excerpted, so documented but unsampled links are dashed and evidence limits are noted.
Main entry points: Server.cpp Command Dispatch · Server.hpp Active Channels · join.cpp Channel Join · who.cpp WHO Lookup
Components 19
Server Runtime
- Startup Validation
sources/main.cpp - Socket Polling
sources/Server.cpp - Command Dispatch
sources/Server.cpp
Protocol Commands
- Registration
commands/pass.cpp - Nick and User
commands/nick.cpp - Channel Join
commands/join.cpp - Private Messaging
commands/privmsg.cpp - Part and Quit
commands/part.cpp - Channel Operations
commands/mode.cpp - Invitations
commands/invite.cpp - Kick Members
commands/kick.cpp - Topic Management
commands/topic.cpp - WHO Lookup
commands/who.cpp
IRC State
- Client Session State
sources/Client.cpp - Channel State
sources/Channel.cpp - Connected Clients
libs/Server.hpp - Active Channels
libs/Server.hpp
Domain Models
- Message Parsing
sources/Message.cpp
Other components
- IRC Client
Connections 26
- IRC Client → Startup Validation: starts with credentials
README.md - Startup Validation → Socket Polling: configures and runs
sources/main.cpp - IRC Client → Socket Polling: sends IRC lines
README.md - Socket Polling → Message Parsing: parses received lines
- Socket Polling → Client Session State: creates sessions
sources/Server.cpp - Socket Polling → Command Dispatch: dispatches commands
sources/Server.cpp - Command Dispatch → Registration: routes PASS
- Command Dispatch → Nick and User: routes NICK USER
sources/Server.cpp - Command Dispatch → Channel Join: routes JOIN
sources/Server.cpp - Command Dispatch → Private Messaging: routes PRIVMSG
sources/Server.cpp - Command Dispatch → Part and Quit: routes PART QUIT
sources/Server.cpp - Command Dispatch → Channel Operations: routes MODE
sources/Server.cpp - Command Dispatch → Invitations: routes INVITE
sources/Server.cpp - Command Dispatch → Kick Members: routes KICK
sources/Server.cpp - Command Dispatch → Topic Management: routes TOPIC
sources/Server.cpp - Command Dispatch → WHO Lookup: routes WHO
- Socket Polling → Connected Clients: stores sessions
libs/Server.hpp - Socket Polling → Active Channels: stores channels
libs/Server.hpp - Channel Join → Active Channels: creates and updates
commands/join.cpp - Channel Join → Channel State: uses membership state
commands/join.cpp - Channel Operations → Channel State: changes channel modes
commands/mode.cpp - Nick and User → Client Session State: updates identity
commands/nick.cpp - WHO Lookup → Connected Clients: looks up clients
commands/who.cpp - WHO Lookup → Active Channels: looks up channels
commands/who.cpp - Private Messaging → Active Channels: sends channel messages
commands/privmsg.cpp - Socket Polling → IRC Client: sends protocol replies