This project aims to create a standard IRC server for client/server exchanges.
It was developed by Léon Pupier, Thibault Giraudon and Elias Zanotti as part of the school 42 curriculum.
Important
We recommend using the HexChat client to connect to the server, its compatibility is guaranteed.
- How to make the executable
- How to setup the server
- Commands availables:
- Credits
- Clone the GitHub repository
git clone https://github.com/eliaszanotti/irc.git
- Open the console in the current directory
cd irc
- Compile the project with the Makefile
make
- Run the executable named ircserv
- Enjoy ;)
./ircserv <port> <password>
The server executable expects 2 arguments to be able to be executed. The port on which listens for incoming connections and the password to ensure server security.
Command: CAP
The CAP command is used for capability negotiation between a server and a client. HexChat send CAP directly after the connection to the server. The command returns to the client:
PASS <password>
NICK <nickname>
USER <name> 0 * :<realname>
Command: INVITE <nickname> <channel>
The INVITE command is used to invite a user to a channel. The parameter nickname is the nickname of the person to be invited to the target channel channel.
Command: INVITE
If INVITE is executed without arguments, the client receives a list of channels where it is invited.
Command: JOIN <channel>{,<channel>} [<key>{,<key>}]
The JOIN command indicates that the client wants to join the given channel(s), each channel using the given key for it.
Command: KICK <channel> <user> [<reason>]
The KICK command can be used to request the forced removal of a user from a channel. It causes the user to be removed from the channel by force. The reason for the KICK is optional and will be sent to the user if provided.
Command: LIST
The LIST command is used to get a list of channels along with some information about each channel.
Command: MODE <channel> [<mode> [<mode arguments>...]]
The MODE command is used to set or remove options (or modes) from a given channel. mode starts with a '+' or '-' character:
- '+': Adds the following mode(s).
- '-': Removes the following mode(s).
And is made up of the following characters:
- +o : Add the operator privilege on user
- -o : Remove the operator privilege on user
For example:
Command: MODE #lobby +o xavier
Explanation: The user Xavier becomes an operator.
Note
By default, the founder of the channel is the only operator of the channel.
- +t : Operators are the only ones who can change the topic
- -t : All channel users can change the topic
For example:
Command: MODE #lobby +t
Explanation: The topic can only be modified by operators now.
Note
By default, all users can change the topic of a channel.
- +i : Make the channel invitation only
- -i : Make the channel public
For example:
Command: MODE #lobby +i
Explanation: The channel is now on invitiation only.
Note
By default, the channel is public.
- +k : Add a password to the channel
- -k : Make the channel without password
For example:
Command: MODE #lobby +k welcome
Explanation: The user set the password "welcome" on the channel #lobby.
Note
By default, the channel has no password.
- +l : Add a user limit to the channel
- -l : Remove the channel user limit
For example:
Command: MODE #lobby +l 42
Explanation: The maximum number of users on the channel is 42.
Note
By default, the channel has no user limit.
Command: MOTD
The MOTD command is used to get the “Message of the Day” of the server.
Command: NICK <nickname>
The NICK command is used to give the client a nickname or change the previous one.
Command: PART <channel>{,<channel>} [<reason>]
The PART command removes the client from the given channel(s). On sending a successful PART command, the user will receive a PART message from the server for each channel they have been removed from. reason is the reason that the client has left the channel(s).
Command: PASS <password>
The PASS command is used to set a ‘connection password’. If set, the password must be set before any attempt to register the connection is made. This requires that clients send a PASS command before sending the NICK / USER combination.
Command: PING <token>
The PING command is sent by either clients or servers to check the other side of the connection is still connected and/or to check for connection latency, at the application layer with the token.
Command: PRIVMSG <target>{,<target>} <text to be sent>
The PRIVMSG command is used to send private messages between users, as well as to send messages to channels. target is the nickname of a client or the name of a channel.
Command: QUIT <reason>
The QUIT command is used to terminate a client’s connection to the server. A reason can be provided to tell others why the user is leaving the server
Command: TOPIC <channel> [<topic>]
The TOPIC command is used to change or view the topic of the given channel.
Command: USER <username> 0 * <realname>
The USER command is used at the beginning of a connection to specify the username and realname of a new user.
Command: WHO <mask>
This command is used to query a list of users who match the provided mask.
The server was entirely developed by the 3 project collaborators. Bisous bisous <3