{"id":20383578,"url":"https://github.com/ygor-sena/42cursus-ft-irc","last_synced_at":"2026-01-07T16:48:30.306Z","repository":{"id":235786223,"uuid":"782213564","full_name":"ygor-sena/42cursus-ft-irc","owner":"ygor-sena","description":"The 12th project of 42's curriculum is about creating our own IRC server. An actual IRC client will be used to connect to the server and test it. Internet is ruled by solid standards protocols that allow connected computers to interact with each other. It’s always a good thing to know.","archived":false,"fork":false,"pushed_at":"2024-06-04T16:49:40.000Z","size":1414,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T03:12:47.710Z","etag":null,"topics":["42","42cursus","42saopaulo","42school","42sp","ecole42","ft-irc","irc","irc-bot","irc-protocol","irc-server"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ygor-sena.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-04T21:19:20.000Z","updated_at":"2024-06-04T16:49:44.000Z","dependencies_parsed_at":"2024-05-30T21:45:22.604Z","dependency_job_id":"f648dee2-bf41-46c9-b54c-9c7d0d63cd2d","html_url":"https://github.com/ygor-sena/42cursus-ft-irc","commit_stats":null,"previous_names":["ygor-sena/42cursus-ft-irc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-ft-irc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-ft-irc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-ft-irc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygor-sena%2F42cursus-ft-irc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ygor-sena","download_url":"https://codeload.github.com/ygor-sena/42cursus-ft-irc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246168103,"owners_count":20734390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42cursus","42saopaulo","42school","42sp","ecole42","ft-irc","irc","irc-bot","irc-protocol","irc-server"],"created_at":"2024-11-15T02:23:26.111Z","updated_at":"2026-01-07T16:48:25.266Z","avatar_url":"https://github.com/ygor-sena.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/ygor-sena/42cursus-ft-irc/assets/102881479/51bb7248-3bc7-4fb0-9e41-c71bedb7b3d4\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/OS-Linux-blue\" alt=\"OS\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Language-C%2B%2B98-blue.svg\" alt=\"Language\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Grade-125%2F100-brightgreen.svg\" alt=\"Grade\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Status-Completed-brightgreen.svg\" alt=\"Status\"\u003e\n\u003c/p\u003e\n\n\n📣 Introduction\n---------------\nThe 12th project of 42's curriculum is about creating our own IRC server. An actual IRC client will be used to connect to the server and test it. Internet is ruled by solid standards protocols that allow connected computers to interact with each other. It’s always a good thing to know.\n\n📜 Requirements\n---------------\n\nWe have implemented both the mandatory and bonus requirements of this project. The following table summarizes all the possible commands that our IRC server is capable of processing.\n\n|Command|Usage|Flags|Description|\n|:--|:--|:--|:--|\n|`PASS`| `PASS \u003cpassword\u003e `|- |Connect to the IRC server by providing a password.|\n|`USER`| `USER \u003cusername\u003e `| - | Create a new username. |\n|`NICK`|`NICK \u003cnickname\u003e ` | - | Create a new nickname.|\n|`JOIN`|`JOIN \u003cchannel\u003e [\u003ckey\u003e]` | - | Join a channel, if it already exists, otherwise create a new channel. It's also possible to provide a key (password) to access the channel.|\n|`INVITE`|`INVITE \u003cnickname\u003e \u003cchannel\u003e` | - | Invite a client to a channel.|\n|`TOPIC`| `TOPIC \u003cchannel\u003e [\u003ctopic\u003e]`| - | Change or view the channel topic.|\n|`PRIVMSG`| `PRIVMSG \u003creceiver\u003e{,\u003creceiver\u003e} \u003ctext to be sent\u003e`| - | Sends a message to one or more clients or channels. If there are more than one receiver, they must be separated by `,`.| \n|`MODE`| `MODE \u003cchannel\u003e \u003cflag\u003e [\u003climit\u003e] [\u003cuser\u003e]`| `+i` or `-i` | Change the channel's mode. This flag sets/removes Invite-only channel.|\n||| `+t` or `-t` | Change the channel's mode. This flag sets/removes the restrictions of the `TOPIC` command to channel operators. |\n||| `+k` or `-k` | Change the channel's mode. This flag sets/removes the channel key. |\n||| `+o` or `-o` | Change the channel's mode. This flag gives/takes channel operator privilege. |\n||| `+l` or `-l` | Change the channel's mode. This flag sets/removes the user limit to channel. |\n|`PART`| `PART \u003cchannel\u003e`| - | Leave a channel.|\n|`KICK`| `KICK \u003cchannel\u003e \u003cuser\u003e [\u003ccomment\u003e]`| - | Eject a client from the channel. It's also possible to provide a commentary.|\n|`QUIT`| `QUIT`| - | Closes the IRC server connection.|\n|`MARVINBOT`| `MARVINBOT \u003cflag\u003e` |`marvin`| Marvin presents himself!|\n||| `quote` | Marvin recites a philosophy quote!|\n||| `time` | Marvin answers the current time.|\n||| `whoami` | Marvin answers who you are.|\n|| |`whois` | Marvin gets information about other clients logged on the IRC server.|\n\n\u003e[!IMPORTANT]\n\u003e Some command have to meet some requirements for its usage by the client:\n\u003e - To execute the command `KICK` and `MODE`, the client must have channel operator privileges.\n\u003e - To execute the command `MARVINBOT`, the client must have joined at least one channel.\n\u003e - If the command requires a channel, the channel name must begin with `#`.\n\n⚒️ How to compile and run the project\n-------------------------------------\n\n#### 1) Copy this repository to your local workstation\n\n```\ngit clone https://github.com/ygor-sena/42cursus-ft-irc.git\n```\n\n#### 2) Install the required libraries to run the project and the unit tests\n\n```\nsudo apt-get install libcriterion-dev\n```\n\n\u003e[!NOTE]\n\u003eIf your operating system is different than Ubuntu `version \u003e= 21.04`, then check the official documentation about how to proceed with Criterion framework installation [here](https://github.com/Snaipe/Criterion.git).\n\n#### 3) Compile the project with Makefile\n\n```\nmake\n```\n\nTo compile and execute the tests, just run `make` inside the folder `42-IRC/tests`.\n\n#### 4) Launch the IRC server\n\nTo launch the IRC server, you must provide a port number and a password. For example, the command below launches the IRC server to listen to port number `4444` and the password to access it is `12345`.\n\n```\n./ircserv 4444 12345\n```\n\n#### 5) Connect one or more clients to the IRC server and have fun!\n\nThere are two ways to connect a client to the IRC server: via CLI or IRC client of your choice. \n\n\u003e [!NOTE]\n\u003e We used [Hexchat](https://hexchat.github.io/) as **our** IRC client of reference. Therefore, we recommend that you use it as well if you want to connect to the IRC server using a GUI. Check its official documentation about how to install Hexchat IRC client on you local machine [here](https://hexchat.github.io/downloads.html).\n\nTo connect to the IRC server on port number 4444 using the command line, open a new terminal and run the following command:\n\n```\nnc localhost 4444\n```\n\nTo use the server, you will have to authenticate the client connection by providing a password and registering the client on the server by creating an username and a nickname. For example:\n\n```\nPASS 12345\nUSER username\nNICK nickname\n```\n\nAfter that, the client is allowed to use all the other IRC command implemented for this project as specified [here](https://github.com/ygor-sena/42cursus-ft-irc?tab=readme-ov-file#-requirements).\n\nTo connect to the IRC server using Hexchat, you have to create a new network called `localhost/4444` and select the following options:\n- [X] Connect to selected server only\n- [X] Connect to this network automatically\n- [X] Accept invalid SSL certificates\n- Login method: Server password (/PASS password)\n- Last but not least, fill the fields `Nick name`, `Second choice`, `Real name`, `User name` and `Password`\n\nAfter the setting, you can click on `Connect` to connect with the IRC server and use the implemented commands on the prompt command line. Since the file management is done by IRC clients, it's possible to send a file from a client to another one if both clients are using Hexchat.\n\n📖 References\n--------------\n\nMain references:\n- [Internet Relay Chat](https://chi.cs.uchicago.edu/chirc/irc.html) by The UChicago χ-Projects.\n- [RFC 1459 - Internet Relay Chat Protocol](https://datatracker.ietf.org/doc/html/rfc1459#section-4.2.7) by J. Oikarinen and D. Reed.\n- [Small IRC Server \\[ft_irc 42 network\\]](https://medium.com/@afatir.ahmedfatir/small-irc-server-ft-irc-42-network-7cee848de6f9) by Ahmed Fatir.\n\nAbout network programming:\n- [Beej's Guide to Network Programming](https://beej.us/guide/bgnet/html/split-wide/index.html) by Brian “Beej Jorgensen” Hall.\n- [Sockets and Network Programming in C](https://www.codequoi.com/en/sockets-and-network-programming-in-c/) by Mia Combeau.\n- [Sockets in Computer Network](https://www.geeksforgeeks.org/socket-in-computer-network/) by [GeeksforGeeks](https://www.geeksforgeeks.org/).\n\nAbout recommended design patterns for this project:\n- Many-to-many relationships: [Mediator Design Pattern in C++](https://www.vishalchovatiya.com/mediator-design-pattern-in-modern-cpp/) by [Vishal Chovativa](https://www.vishalchovatiya.com/)\n- One-to-many relationships: [Observer Design Pattern in C++](https://www.vishalchovatiya.com/observer-design-pattern-in-modern-cpp/) by [Vishal Chovativa](https://www.vishalchovatiya.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fygor-sena%2F42cursus-ft-irc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fygor-sena%2F42cursus-ft-irc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fygor-sena%2F42cursus-ft-irc/lists"}