-
Notifications
You must be signed in to change notification settings - Fork 2
Functionality
The purpose of this IRC server is to create a program that allows multiple clients to communicate with each other in real-time over the internet. Through the use of this server, clients will be able to join channels, send and receive messages, and participate in conversations with other clients.
The goals of this IRC server include:
- Supporting multiple clients simultaneously without hanging or crashing.
- Allowing clients to authenticate and set a nickname and username.
- Enabling clients to join channels and send and receive messages with other clients in the same channel.
- Providing operator commands for designated users
- Ensuring that communication between the server and clients is done via TCP/IP
- Achieving functionality that is similar to using an official IRC server when used with the chosen reference client
In order to connect to the IRC server, clients must first authenticate by providing the correct connection password. This password is specified as a command-line argument when starting the server and should be passed as a parameter by the client when attempting to connect.
The authentication process should be handled by the server, which should verify that the provided password is correct before allowing the client to be fully registered. If the password is incorrect, the server should not register the client and display an error message to them.
The server will never accept the client which is done by sending the welcome message to the client unless the client sends the correct password. It is worth noting that the password is part of the registration phase so the client won't be fully accepted unless the server has received the NICK
, and USER
commands, otherwise, the client won't be fully registered but not rejected till they send the required commands to finish this phase.
One of the main features of an IRC server is the ability to join channels and participate in conversations with other clients. Clients can join a channel by using a specific command, such as JOIN #channel
, and specifying the name of the channel.
The server should parse this command and add the client to the specified channel. The server should also broadcast the client's presence in the channel to other clients in the same channel. If the specified channel does not exist, the server should create it and add the client to it.
It is important to allow clients to join channels in order to facilitate communication and group discussions on the IRC server.
Once connected to the server and joined to a channel, clients should be able to send and receive messages with each other. Clients can send messages to a channel or privately to another client by using specific commands, such as PRIVMSG nick hello
or PRIVMSG #channel hey all
.
The server should parse these commands and deliver the message to the appropriate recipients. If the message is sent to a channel, it should be forwarded to all other clients in the same channel. If the message is sent privately, it should be delivered directly to the specified recipient.
It is important to allow clients to send and receive messages in order to facilitate communication and facilitate real-time conversations on the IRC server.
In Internet Relay Chat (IRC), an operator (often abbreviated as "op" or "ircop") is a user who has been granted additional privileges on the server and/or in channels. There are two types of operator privileges: server operators and channel operators.
Server operators (also known as IRC operators or IRCops) are users who have been granted special privileges on the IRC server. These privileges include the ability to manage the server and its configuration, as well as the ability to perform certain tasks that regular users cannot do, such as killing connections, banning users, and performing other administrative tasks. Server operators have the ability to use server-level commands, such as KILL, GLINE, and RESTART as well as wildcards availability on PRIVMSG.
Channel operators are users who have been granted special privileges on a specific channel. These privileges include the ability to manage the channel and its configuration, as well as the ability to perform certain tasks that regular users cannot, such as kicking and banning users, setting channel modes, and performing other moderating tasks. Channel operators have the ability to use channel-level commands, such as KICK, BAN and MODE.
In the context of the project ft_irc, the focus is on implementing the functionality of server-client and client-client communications. This means that the project will not include the implementation of server-level operator privilege, which typically involves the management and configuration of the IRC server, such as killing connections, banning users, and performing other administrative tasks. Instead, the project will focus on the implementation of channel operator privilege, which typically involves the management and configuration of a specific channel, such as kicking and banning users, setting channel modes, and performing other moderating tasks on that channel.