A simple IRC-like server implemented in C++98 (42 School
ft_ircproject).
This repository contains an implementation of an IRC-style server written in C++98.
The typical goals of the 42 ft_irc project are to:
- implement a TCP server that accepts multiple clients
- parse IRC commands/messages
- manage clients and channels
- handle basic authentication (PASS/NICK/USER) and messaging
Repository: otelliq/irc
Main project directory: ft_irc/ft_irc/
Default branch: main
A Makefile is provided in ft_irc/ft_irc/.
make -C ft_irc/ft_ircNote: the current Makefile uses AddressSanitizer (
-fsanitize=address) and-g, which is great for debugging.
After building:
./ft_irc/ft_irc/ft_irc <port> <password>(Exact arguments may vary depending on your implementation—see main.cpp for the definitive usage.)
You can connect using an IRC client like HexChat or irssi (examples):
# Example (replace PORT and PASSWORD)
/nick mynick
/user myuser 0 * :Real NameOr via netcat for basic testing:
nc 127.0.0.1 <port>.
└── ft_irc/
├── channel.cpp / channel.hpp
├── client.cpp / client.hpp
└── ft_irc/
├── Makefile
├── main.cpp
├── server.cpp / server.hpp
├── server_infos.cpp
├── Channel*.cpp / Channel*.hpp
├── Client*.cpp / Client*.hpp
└── ...
- The repo has both lowercase and uppercase
Channel/Clientfiles in different directories—this is fine on Linux, but can be confusing on case-insensitive filesystems. - Consider adding a top-level
.gitignoreif you don’t want to commit*.oor the built binary.
No license file is included. If you want others to reuse this outside of an academic context, add a LICENSE file (MIT/Apache-2.0 are common choices).