Checkout the rfc here: https://www.rfc-editor.org/rfc/rfc2812#section-1.3
IRC Client I recommend on a mac : LimeChat
.
Use Wireshark
to see the packets sent by a client (filter port 6667
and choose loopback to debug locally)
To run the server:
# define the password you want but make sure to add this argument
./ircserv 6667 PASSWORD
To run the server another port so the proxy can run on 6667:
./ircserv 6668 PASSWORD
To test a new client connection from the terminal (optional)
brew install telnet
# then
telnet 127.0.0.1 6667
PASS PASSWORD
NICK nickname
USER username 0 * :realname
ADMIN
AWAY :reason
AWAY
to remove away status
DIE
INVITE nickname #channel
JOIN #channel
JOIN #channel1,#channel2,#channel3
#
channel names that are missing it, but you'd rather not do it (not supported on every client).
TOPIC #channel :newtopic
KICK #channel nickname
KICK #channel nickname :reason
KILL nickname
Make sure you handle theKILL nickname :reason
even with spaces.
LIST
LIST #channel
The user mentionned must be the same as the one connected to the server.
MODE nickname +i
(to give invisible status)MODE nickname -i
(to remove invisible status)
You can see if this is working fine by doing a LIST comman after and see the different before and after.
MODE #channel +t
(to give topic protection)MODE #channel -t
(to remove topic protection)MODE #channel +k password
(to give a key to the channel)
MOTD
Make sure multiple users are present in the channel. Checkout on the terminal what the server sends back, cause you might probably see nothing on the client software.
NAMES
NAMES #channel
NICK nickname
NOTICE nickname :Hello
OPER username password
PART #channel
PART #channel :I am leaving
PASS password
PING ft_irc
It should receive a PONG back from the server.
PRIVMSG nickname :Hello
PRIVMSG #channel :Hello
PRIVMSG #channel key :Hello
QUIT
TIME
TOPIC #channel :newtopic
USER username localhost ft_irc :realname
VERSION "ft_irc"
WHO user*
WHO user* o
WHO *
Disclaimer: while testing it afterwards, we noticed that some segmentation faults could be encountered. Make sure to test it properly and to fix it if you encounter any.
To run the proxy (optional):
python3 proxy.py
Our proxy and bot bonus are not working perfectly so don't mind errors from them.