The ft_irc project at 42 involves implementing an IRC (Internet Relay Chat) server and client using the C language. The goal is to create a real-time communication system, allowing multiple users to connect to discussion channels.
- Connect to the IRC server
- Create and manage discussion channels
- Send public and private messages
- Handle IRC commands (JOIN, PART, PRIVMSG, etc.)
- Implement the IRC protocol
- GCC (GNU Compiler Collection)
- ...
- Clone the repository:
git clone https://github.com/aascedu/ft_irc
- Compile the project:
make
- Start the server:
./ircserv [port] [passwd]
- Launch the client:
nc -C localhost [port]
or using HexChat
Example of using the server and client.
# Terminal 1 - Start the server
$ ./ircserv 2000 qwerty
IRC server started on port 2000 with password "qwerty"
# Terminal 2 - Connect a client
$ nc -C localhost 2000
Connected to the IRC server
# Terminal 2 - Register process
PASS qwerty
NICK nickname
USER username 0 * :username
# Terminal 2 - Join a channel
JOIN #general
# Terminal 2 - Send a message on the channel
PRIVMSG #general :Hello, everyone!
# Terminal 2 - Leave the channel
PART #general
# Terminal 3 - Start OpenAI Bot
make bot
# Terminal 2 - Send a question to the bot
PRIVMSG bot Are you an IA from OpenAI ?