Skip to content

Latest commit

 

History

History
87 lines (64 loc) · 2.28 KB

README.md

File metadata and controls

87 lines (64 loc) · 2.28 KB

ft_irc

Table of Contents

About

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.

Features

  • 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

Prerequisites

  • GCC (GNU Compiler Collection)
  • ...

Installation

  1. Clone the repository: git clone https://github.com/aascedu/ft_irc
  2. Compile the project: make

Usage

  1. Start the server: ./ircserv [port] [passwd]
  2. Launch the client: nc -C localhost [port] or using HexChat

Examples

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 ?

Resources

Authors