Summary:
This project is about creating your own IRC server.
You will use an actual IRC client to connect to your server and test it.
Internet is ruled by solid standards protocols that allow connected computers to interact
with each other.
It’s always a good thing to know.
Explore the docs »
This project, ft_irc, is an endeavor to create a fully functional IRC (Internet Relay Chat) server from scratch. The goal is to understand and implement the protocols that govern the internet, specifically the IRC protocol, which is a cornerstone of real-time communication over the internet. We are mainly going to implement the server side, while using an already established client to test our server.
For this project, we used IRSSI, a terminal-based IRC client for UNIX systems. It is open-source and highly configurable, making it a popular choice for IRC users.
IRSSI provides a robust and user-friendly interface for IRC communications. It supports multiple servers and channels, and it offers a variety of scripts and themes to customize the user experience.
We used the rawlog to be able to check for the format of IRSSI, formatting the Replies and the Errors was easier with it when we were connecting to DALnet on IRSSI.
rawlog: ./rawlog open [path_of_the_rawlog_that_[was]/[will_be]_created]
On Ubuntu/Debian:
sudo apt-get update
sudo apt-get install irssiOn macOS (using Homebrew)
brew install irssi| Command | Description |
|---|---|
Invite |
Invite a client to a channel that is set to invite-only |
Join |
Try to join a channel or create one if it does not exist |
Kick |
If the user is the channel operator, kick the targeted user from given channel |
Kill |
Available to server operator, close the targeted client connection |
Mode |
Set the channel mode if channel operator (channel mode: i,k,l,o,t) |
Nick |
Nick set/change the nickname of the client if the nickname is not already given |
Oper |
Set user to Operator if correct password given |
Part |
Leave the given channel |
Pass |
Set the password to the client and compare if it is the same as the server |
Privmsg |
Send a message to the targeted client / channel |
Quit |
Disconnect from the server and quit the IRC client used |
Topic |
Available to channel operator, set the topic of the channel |
User |
Set the username of the client |
- Clone the repo
git clone https://github.com/bfjberger/irc_42.git
- Download your reference IRC client
- With our reference IRC client: irssi
- start irssi
irssi
- connect to the server
/connect <ipaddress> <port> <password> #hence /connect localhost 6667 password
- With netcat
nc <host> <port> #hence nc localhost 6667
Now enjoy
-
For the IRC server
-
For irssi
-
For the sockets
