Code Monkey home page Code Monkey logo

ft_irc's Introduction

FT_IRC 42 school project - with Tokutaro & Sébastien

This project is about creating our own IRC server. Capture d’écran, le 2022-08-24 à 15 52 58

Internet Relay Chat (IRC) is a text-based chat system for instant messaging; designed for group communication in channels, but also for one-to-one communication via private messages.

How to ?

Clone the repo :

git clone https://github.com/justinebadia/FT_IRC.git

Do makeand then run :

./ircserv 6667 pass

Our server listen for incoming connections on port 6667. The second argument is the password that each client need to connect.

With netcat

To ensure that our server correctly process everything that you send to it, you can use netcat command. The basic syntax for nc command is : nc [<options>] <host> <port>

So, you can type:

nc -C 127.0.0.1 6667

The -C option send CRLF as line-ending. You can also type control+v followed by control+m to insert a carriage-return.

First, you have to register as a user, so you'll need to enter the correct password, and the user and nick commands.

PASS pass
USER user * * :realname
NICK nickname 

Once you're register, you'll receive a welcome reply : Welcome to the Internet Relay Network [email protected]

With Hexchat

Commands

Commands Description
Connection registration
PASS <password> - Must be send before the NICK and USER commands.
NICK NICK <nickname> - Allows a client to change their IRC nickname.
USER USER <user> <mode> <unused> <realname> - Is used at the beginning of a connection.
OPER OPER <username> <password> - Authenticates a user as an IRC operator on that server.
QUIT QUIT [<message>] - Disconnects the user from the server.
SQUIT SQUIT <server> <comment> - Causes <server> to quit the network.
Channel operations
JOIN JOIN <channels> [<keys>] - Makes the client join the channels in the comma-separated list <channels>, specifying the passwords, if needed, in the comma-separated list <keys>. If the channel(s) do not exist then they will be created.
PART PART <channels> [<message>] - Causes a user to leave the channels in the comma-separated list <channels>.
MODE MODE <channel> <flags> [<args>] - Used to set channel modes.
TOPIC TOPIC [] - Allows the client to query or set the channel topic on <channel>. If <topic> is given, it sets the channel topic to <topic>.
NAMES NAMES [<channels>] - Returns a list of who is on the comma-separated list of <channels>, by channel name. If <channels> is omitted, all users are shown.
LIST LIST <channels> - Lists all channels on the server.
INVITE INVITE <nickname>\ <channel> - Invites <nickname> to the channel <channel>. On our server, <channel> has to be in mode +i, so only channel operators may invite other clients.
KICK KICK <channel> <client> :[<message>] - This command may only be issued by channel operators. It forcibly removes <client> from <channel>.
Sending messages
PRIVMSG PRIVMSG <target> :<message> - Sends <message> to <msgtarget>, which is usually a user or channel.
NOTICE NOTICE <target> <message> - Works similarly to PRIVMSG, except automatic replies must never be sent in reply to NOTICE messages.
User queries
WHO WHO <name> - Returns a list of users who match <nickname>.
WHOIS WHOIS <nickname> - Returns information about <nickname>.
Miscellaneous messages
KILL KILL - This command may only be issued by IRC operators. It forcibly removes <client> from the network.
PING PING - Tests the presence of a connection. PING message results in a PONG reply.
ERROR ERROR - It is used before terminating client connections.

ft_irc's People

Contributors

fousse24 avatar justinebadia avatar rurikide avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

fousse24

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.