Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

ft_irc

A simple IRC-like server implemented in C++98 (42 School ft_irc project).

Language Networking Project

Overview

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

Build

A Makefile is provided in ft_irc/ft_irc/.

make -C ft_irc/ft_irc

Note: the current Makefile uses AddressSanitizer (-fsanitize=address) and -g, which is great for debugging.

Run

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.)

Connect with an IRC client

You can connect using an IRC client like HexChat or irssi (examples):

# Example (replace PORT and PASSWORD)
/nick mynick
/user myuser 0 * :Real Name

Or via netcat for basic testing:

nc 127.0.0.1 <port>

Project structure

.
└── 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
        └── ...

Notes

  • The repo has both lowercase and uppercase Channel/Client files in different directories—this is fine on Linux, but can be confusing on case-insensitive filesystems.
  • Consider adding a top-level .gitignore if you don’t want to commit *.o or the built binary.

License

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).

About

IRC server in C++98 supporting TCP clients, channel management, and IRC commands — 42 Network project

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages