This project involves creating an IRC server from scratch using C++. It implements basic IRC functionality allowing multiple clients to connect and communicate through channels.
- TCP/IP communication
- Private messaging between users
- Channel management by operators
- Clone the repository
git clone https://github.com/andrexandre/ft_irc.git ; cd ft_irc- Compile the program
make- Run the server
./ircserv 8080 1234It is possible to change the
portandpasswordto your preference
- Open hexchat and configure hexchat
- Click
Adda network - Click
Edit...the network - Change the name of the first server from
newserver/6697tolocalhost/8080 - Deactivate the checkbox
Use SSL for all the servers on this network - Change the password to
1234 Closethe settings- And finally
Connect
If hexchat is not installed, you can install it by running:
sudo apt install hexchat -y
Once connected to the server, you can use the following commands:
/nick <nickname>- Change your nickname/join #<channel>- Join a channel/part #<channel>- Leave a channel/quit- Disconnect from server/msg <target> <message>- Send private message to user or channel/topic #<channel> <topic>- View or set channel topic
When you join a channel and your the only one there, you are automatically the channel operator. Some commands can be used outside a channel but should be used inside a channel, so it is easier to write
/kick <user> <reason>- Remove user from channel/mode [mode] [args]- Set channel modes:+i- Set channel invite-only+t- Only operators can change topic+k <password>- Set channel password+o <nickname>- Give operator status-o <nickname>- Remove operator status+l <limit>- Set user limit for channel
Note
This project is part of the 42 School curriculum