Skip to content

naahio/IRC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IRC

The IRC protocol was developed over the last 4 years since it was first implemented as a means for users on a BBS to chat amongst themselves. The IRC protocol is a text-based protocol, with the simplest client being any socket program capable of connecting to the server. The IRC protocol has been developed on systems using the TCP/IP network protocol, although there is no requirement that this remain the only sphere in which it operates.

servers

subject : ft_irc

  • the goal of the project is to create an irc server, where users (Clients) can exchange direct messages, and join group channels.
  • IRC server's are connected together, and has there own rules (Server to Server communication), but we dont have to think about it because we are gonna be making a one server that is able to receive incomming connection from other Clients.

Geting Started :

Server :

  • As what've been told before, the Server can connecte multiple Client with each other, and keep the other servers in touch, but we will not be handling the DSS communication.
  • Creating a server is basiclly creating a Socket with some specific rules :
    socket : Socket programming is a way of connecting two nodes on a network to communicate with each other.
    One socket(node) listens on a particular port at an IP, while the other socket reaches out to the other to form a connection.
    The server forms the listener socket while the client reaches out to the server.

  • to be able to accept an incomming connection, our socket must have an IP Adresse, and an assigned PORT, which is one of our programme's paramaeters.
  • After having the two args, the type of the network protocol must be selected TCP(v4 or v6), the rest be nothing more than a puzzle, all functions that we need are availble, easy to understand and maintain.

    diag

  • With this the Server is ready to go.

Client :

  • At this point we are waiting for any connection from a Client.
  • Several IRC clients exist. You have to choose one of them as a reference(for 1337-kh students there is the LimeChat).
  • Using your reference client with your server must be similar to using it with any official IRC server, which means the replays must be displayed correctly and clearly .
  • each action in made by the Client has it's reaply/result in the server like an asnwer to the request to which could be and error or a command's result .
  • While building the replays it would be better to use the terminal as a client, it makes the follow of the commands much better, you can use the nc -c command with the server IP_Adresse and PORT :

    Screen Shot 2022-10-08 at 11 37 28 AM

  • Using the terminal make it more easy when it comes to the what the Server sends and what the Client receives

    Screen Shot 2022-10-08 at 11 41 25 AM

    Screen Shot 2022-10-08 at 11 43 09 AM

  • And that's it, it's up to you now, using the RFC, you will find everything you need to know and to do, so you can create your own IRC server.
  • Following the subject, there are some specific things that much be done as a mandaroty parts:
    • You must be able to :
      set a nickname, a username, join a channel,
      send and receive private messages using your reference client.
      
    • All the messages sent from one client to a channel have to be forwarded to every other client that joined the channel.
    • You must have operators and regular users.
    • Then, you have to implement the commands that are specific to operators.

    Screen Shot 2022-10-08 at 11 53 34 AM Screen Shot 2022-10-08 at 11 53 01 AM Screen Shot 2022-10-08 at 11 53 46 AM

  • it may be too littel compared to the RFC, but there is no limit to what we can add to the project, from all the channel's mode + the use's mode and the other command that make the server more usable.

Executing program :

  • simply make the code, and run ./ircserv localhost port (you can change the ip and the port) and use your Client to connect :

Screen Shot 2022-10-08 at 1 11 41 PM


- And Done you can communicate with others using the commands you created .

Bonus :

  • For the bonus part there is two tasks :

    BOT .
    FILE TRANSFER .

BOT :

  • there is no limit nor a specific thing to do, you are free to make the bot do anything you like, from a normal commands to some bigger task.
  • Our bot main job is a user tracker, each user connect to the server will be tracked and tranfered into a player with a LEVEL, RANK, POINTS and more.
  • so that the more the user is active with the logtime and the number for commands used, he gain some point that level up him.
  • some levels gives the user a specific rules in the server, or a special channel with the user's nickname, where he is it's operator, even more when a player reach the max level, he becomes a server operator.
  • we names our littel bot /lily, a pertty name for a littel prety bot (^_^)/.
  • using the limeChat or any other Client, you can send profile command to her, she will answer with the player's data.

Screen Shot 2022-10-08 at 1 30 08 PM


  • And finally a location or search command that gives the location of a player in the Cluster whereis :

Screen Shot 2022-10-08 at 1 30 36 PM Screen Shot 2022-10-08 at 1 35 53 PM


> File Transfer :

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published