This project has been created as part of the 42 curriculum by kmummadi, qhahn
This repo contains a non-blocking internet relay chat server, compatible with irssi and netcat. it receives and relays messages and commands over TCP, thus allowing for group and direct communication between clients. functionally, this is achieved through sockets, poll, and various datastructures for the specific aspects of these operations.
c++17capable compiler- make
- network permission to bind to ports for TCP
clone this repo and compile the server in project root directory:
make
run the built executable with port and password:
./ircserv [port] [password]
6667 is the standard unencrypted port for the irc protocol.
after the server successfully started, you can now connect using irssi or netcat(nc).
in a new terminal, run:
irssi
and then connect using irssi:
/connect localhost [port] [password]
nc localhost [port]
then authenticate manually:
PASS [password]
NICK [nickname]
USER [username] 0 * :[realname]
to clean the object files but keep the executable, use:
make clean
to also clean the executable, use:
make fclean
- Authentication:
PASS, NICK, USER, QUIT - Channel Operations:
JOIN, PART, TOPIC, INVITE, KICK, MODE - Messaging:
PRIVMSG, NOTICE - Server Queries:
PING/PONG, WHO, WHOIS
kadd or remove a channel access keyoadd or remove a user from operator statusiset the channel to invite only.llimit the maximum number of channel memberstset channel topic protection status
512bytes per message, including\r\nterminator and commands/syntax.- limited by file descriptor limit of host os (
ulimit -n) NICKcan't exceed 32 charactersUSERcan't exceed 16 characters and will be truncated
AI tools were used for:
- generating boilerplate code
- debugging specific C++ errors
- testing integration of new units
- explaining some IRC protocol numerics
- refactoring some logic flow in client and channel
- Generating comments in the code for documentation purposes