Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has been created as part of the 42 curriculum by mrosset, llabatut, cyglardo.

Description

The ft_irc projects consists of creating a server that can be used by an IRC client.

Basically, the task is to develop a programm that allows to exchange public and private messages by creating and managing users and channels on an already existing IRC client, using the TCP/IP protocol to communicate with it.

Several things are needed in order to accomplish this:

  • Understanding the TCP/IP protocol.
  • Understanding how to use sockets.
  • Parsing the commands.

Instructions

Copy the link of the repository. You can find it by clicking on the green button labelled "<>Code" at the top of the page.

In your terminal, choose the location where you want to install ft_irc, then type:

git clone pasteTheLinkYouCopied

Paste the link and press enter.

In your terminal, go in the cloned repository and type:

make

Press enter. If everything worked, a new file should have been created, named "ft_irc". Execute it with a port and password (example given in the "configuration.txt" file), like this:

./ircserv port password

Press enter. The server should now be running. Open the IRC client and connect it to your server using its name, its port and its password.

Weechat

Once installed, launch it with

weechat

Then, add the server with

/server add ircserv 0/6667

0 = the server's address 6667 = the suggested port

Then, configure the server with

/set irc.server.ircserv.password password
/save

password = the server's password

Then, connect to the server with

/connect ircserv

If the connection is successful, you can now use the client as if it was connected to any official server.

To test it thoroughly, open multiple clients and connect them all to the server. Every client should work normally and act as different users.

To launch another client, use:

weechat --dir <newclientname>

Things you can try:

  • authenticate /pass password
  • set a nickname /nick nickname
  • set a username /user username
  • join a channel /join #channel
  • write a private message to an other user (client) /msg nickname1,nickname2,#channel message
  • kick a user (client) from a channel /kick nickname #channel
  • invite a user (client) to a channel /invite nickname #channel
  • change and view the channel topic /topic #channel newTopic
  • change the channel's parameters (mode):
    • set / remove the access to the channel (open / invite only) /mode [+/-]i #channel
    • set / remove the restrictions on the command allowing to change or view the channel topic /mode [+/-]t nickname #channel
    • set / remove the channel's password (key) /mode [+/-]k password #channel
    • give / take owner (operator) privilege /mode [+/-]o nickname #channel
    • set / remove user limit /mode [+/-]l numberlimit #channel

Ressources

Several websites were used to understand the different technical aspects of the project.

General informations:

The poll() function:

Choosing an IRC client:

Understanding how the IRC client works:

Understanding the replies to send:

Understanding the sockets:

Understanding the packets:

AI :

  • AI was used in this project as an educational support to better understand concepts and clarify technical documentation, or for more detailed explanations.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages