Internet Relay Chat
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.
The function is written in C language and thus needs the c++
compiler and some standard C, C++ libraries to run.
First install a client, here we'll use irssi since it is the one we chose to do the project with :
# using apt to install
sudo apt install irssi
# using brew to install
brew install irssi
1. Compiling the program
To compile, go to the program path and run:
make
2. Executing the program
To launch the server, run:
./ircserv [port number] [password]
Connect to the server with a Netcat
nc localhost [port]
Connect to the server with a IRSSI
irssi
/connect localhost [port] [password]
-
PASS: <password>
The password is used to connect to the server -
NICK: <nickname>
The nickname is used to identify you on the server -
USER: <username> <hostname> <servername> <realname>
The username is used to identify you on the server
-
JOIN: <#channel>
The channel is used to join a channel -
PART: <#channel>
The channel is used to leave a channel -
PRIVMSG: <nickname> <message>
The nickname is used to send a private message to a user -
PRIVMSG: <#channel> <message>
The channel is used to send a message to a channel -
QUIT: <message>
The message is used to leave the server -
PING: <server>
The server is used to check the connection with the server -
KICK: <#channel> <nickname>
The channel is used to kick a user from a channel -
MODE: <#channel> <mode>
The channel is used to change the mode of a channel- Modes:
- o : Give operator status to a user
- l : Only operators can change the channel limit
- t : Only operators can change the topic
- k : Set a password to join the channel
- i : Set the channel to invite only
- Modes:
-
TOPIC: <#channel> <topic>
The channel is used to change the topic of a channel -
INVITE: <#channel> <nickname>
The channel is used to invite a user to a channel -
TIME:
The time is used to check the time of the server -
VERSION:
The version is used to check the version of the server -
HELP: <command>
-
PRIVMSG: bot announce <message>
The bot is used to send a message to all users in server -
PRIVMSG: bot <channel list | channel join | channel invite>
The bot is used to see the list of channels, joining channel, or invited channel -
PRIVMSG: bot sendfile <nickname> <filename_path>
The bot is used to send a file to a user -
PRIVMSG: bot getfile <nickname> <filename_path>
The bot is used to get a file from a user