Skip to content
/ 42_irc Public

Creating an internet relay chat server (IRC server)

Notifications You must be signed in to change notification settings

Nipsu24/42_irc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Internet Relay Chat Server (IRC)

Hive Helsinki (School 42) 13th project (Rank05/06) of core curriculum.

About

The repository contains a custom made Internet Relay Chat server (IRC) to which connection can be established via the IRSSI client. Programming is done in collaboration with:

Worksplit (partly overlapping):

Matti: Client-Server Communication MVP · Private messages · Commands: Join · Signals

Timo: Overall architecture · Commands: Join, Kick, Topic, Invite, Nick · Private messages · Signals · Testing, bugfixing

Marius: Channels & modes · Commands: Join, Kick, Topic, Invite · Testing, bugfixing

Program

The server utelises C++ socket programming in order to create a TCP socket which operates over IP4. The server binds to the socket and furhter listens to incoming connection requests of clients. The following user commands are handled from the server:

  • JOIN
  • NICK
  • INVITE
  • MSG
  • KICK
  • TOPIC
  • MODE
    • +t (only channel operators can set channel topic)
    • +i (join a channel only possible with an invitation)
    • +k (sets password for the channel)
    • +l (sets user limit for the channel)
    • +o (assigns operator role to a channel member)

Requirements

  • c++ compiler
  • macOS or linux based OS with irrsi chat client

Instructions

1. Compiling the program

To compile the files run the following command in the repository folder in the terminal:

$ make 

2. Launch the server

The server can be launched by passing a port_number and password to the executable, e.g.

$ ./ircserv 9090 1234

For connecting a client, open another terminal window and type in the following:

$ irssi

Establish a connection to the server within irssi with the following command (port number used from example above):

$ /connect localhost 9090

3. Navigation within the IRC

Join a channel:

/join <channel_name>

Change nickname:

/nick <nickname>

Invite user to join channel:

/invite <nickname_of_invitee>

Send private message (recipient can change window to private message with cntrl + p):

/msg <nickname_of_recipient> <message>

Set mode (if channel operator):

/mode +t
/mode +i
/mode +k <channel_password>
/mode +l <channel_user_limit>
/mode +o <channel_member>

Set topic of a channel:

/topic <channel_topic>

Kick users from channels (if channel operator):

/kick <channel_member>

About

Creating an internet relay chat server (IRC server)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •