Skip to content

sponthus/IRC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

130 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft_IRC

Description

ft_IRC 42 project badge ft_IRC is a 42 school team project where you need to recreate from scratch an IRC server, according to the . Coding in C++98, this server should follow the standard protocols such as RFC 2812 and RFC 1459.

📝 Status


Status = 95/100% finished
All bonuses

Features

There are two types of requirements: mandatory and bonus.

📙 Mandatory

  • Handle several client simultaneously without blocking ▶️ Tested with 100+ connexions
  • Using a reference client with no errors ▶️ We chose Hexchat
  • Provide user authentification, channel management and operators
  • Handle packet concatenation
  • Reproduce the comportment of an official IRC server, following the standard protocols, on the commands available

🔥 Bonus

  • File sending works
  • Creating a bot

🌀 Clone and compile

Clone the repository and enter it :

git clone https://github.com/sponthus/IRC
cd IRC
make

🏃 Run

From the project directory, enter :

./ircserv [port] [password]

During execution, you will have access to the server logs.
By default, the server will be hosted at localhost:[port].

💻 Server commands handled

  • PASS allows you to enter server password
  • NICK allows you to give your nickname or change it later
  • USER allows you to give your username
  • JOIN allows you to join 1 or more channel(s), or create them if they don't exist
  • PART allows you to leave 1 or more channel(s)
  • PRIVMSG allows you to send a message, to a channel or a specific nickname
  • KICK allows you to kick someone from a channel
  • INVITE allows you to invite someone to a channel you're in
  • TOPIC allows you to either see the topic of a channel, or change it
  • WHO with a channel, allows you to see who is connected on a channel
  • MODE with options to add/remove: i: invitation only channel k: key-protected channel o: add/remove operator privilege on channel l: user limit on channel
  • QUIT leaves the server, you can add a message

❓ Bot

The bot can be launched with :

./QuestBot [port] [password]

Where port is the port of the server at localhost, and the password from the IRC server.

This bot creats its own channel, or joins it if already existing, and starts asking random questions if players are connected to the channel. He recognizes the answers given. You will have access to the bot logs during execution.

You will find an example of questions the bot can learn at /capitals.txt. Questions can be formatted by following:

  • Begins with theme=[theme]
  • Followed by questions formatted as : [question ?]|[answer(s)]
  • You can add 1 or more answers, using : [answer1]/[answer2]/...
  • Answers accepted will include capitalized or non-capitalized answers You can teach questions to the bot by using :
LEARN [question_file]

In the bot program.

🤗 Enjoy !

Made by endoliam and sponthus

About

42 school project about standard IRC server communication

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors