This project is an IRC server implemented in C++98. It allows users to connect via IRC clients (netcat and Lime Chat were used for this project) and communicate through real-time messaging, both in public channels and through private messages.
- User Management: Users can set their nickname and username.
- Authentication: Clients need to provide a password to connect to the server.
- Channel Management: Users can join channels, and all messages sent to a channel are forwarded to every client in that channel.
- Private Messaging: Users can send and receive private messages.
- Operator Privileges: The server distinguishes between regular users and operators (admins). Operators have additional permissions and can perform specific commands.
- Channel Commands: Operators can kick users from a channel, invite users to a channel, change or view the channel topic, and modify the channel mode (invite-only, topic restrictions, password, user limit).
- C++98 compliant compiler
- Unix-like operating system (Linux, macOS)
- Clone the repository:
git clone https://github.com/Shetteemah/ft_irc.git
- Change to the project directory:
cd ft_irc
- Compile the server using the provided Makefile:
make
- Run the server with the desired port number and password:
./ircserver <port> <password>
To test the server, you need an IRC client. The server interacts greatly with the netcat
client and the reference client for us was Lime chat
IRC client. Configure the client to connect to the server using the specified port and password.
- Give 3 parameters:
nc
<host>
<port>
. - Enter the password:
PASS
<password>
. - Give the username:
USER
<username>
. - Give the nickname:
NICK
<nickname>
.
- Enter a network name of your choice.
- In the server field, enter the
<host>
. - Enter the
<port>
in the port field. - Enter the
<server password>
in the Server Password field. - Enter the client
<username>
in the Nickname field. - Click
Ok
to proceed.
JOIN
: Usage:JOIN
<#channel name>
<message (optional)>
. It is used to create a new channel if a channel with that name doesn't already exist. Otherwise, the command lets you join an existing channel. All channel names must start with a#
.PRIVMSG
: Usage:PRIVMSG
<username>
Send a message to a user.PRIVMSG
<#channel name>
<username>
Send a message to all users in a channel.
LIST
: This command lets you see all the information of all the channels existing on the server.WHOIS
: Usage:WHOIS
<username>
. This command pulls up an info sheet of the user.INVITE
: Usage:INVITE
<#channel name>
<invitee username>
. This command invites the specified user to the specified channel.MODE
: TheMODE
command can be used by an admin to change the channel’s mode in a number of ways:MODE
+/-i
<#channel name>
: Set/remove Invite-only channel.MODE
+/-t
<#channel name>
: Set/remove the restrictions of the TOPIC command to channel operators.MODE
+/-k
<#channel name>
: Set/remove the channel key (password).MODE
+/-o
<#channel name>
: Give/take channel operator (admin) privilege.
KICK
: Usage:KICK
<username>
: Ejects the client whose username is given from the channel.QUIT
: This command allows the user to disconnect from the server.EXIT
: This command can be used by any user to close the server.
**Please note that Lime Chat recognizes command keywords in both upper and lower case, while the nc
client only recognizes upper case commands.
We welcome you to test the server with different scenarios, including handling multiple clients, various commands, and error conditions. Specifically with lime chat
IRC client. Feel free to report bugs or make recommendations to any of the group members listed below.
This project is a group project built by:
Anas Dinary (adinari)
Reda Doukali (rdoukali)
Shettima Ali (sheali)
This project is licensed under the MIT License.