Skip to content

bookseal/irc_server

Repository files navigation

IRC Server Project

This project implements a basic Internet Relay Chat (IRC) server using C++. It handles user connections, channels, and basic IRC commands like messaging, joining channels, and user authentication.

Features

  • User Connection Handling: Manages multiple client connections and processes their input.
  • Channel Management: Allows users to join, leave, and interact with IRC channels.
  • Basic IRC Commands: Supports standard commands like NICK, USER, JOIN, PRIVMSG, PART, and more.
  • Message Broadcasting: Messages can be sent to individuals or broadcasted within a channel.
  • Command Parsing: Processes user input to execute the correct IRC commands.

Files

IRCServer.hpp and IRCServer.cpp

  • IRCServer: The main class that handles incoming client connections and manages channels.
  • Functions:
    • sendMessageToUser(): Sends a message from one user to another.
    • initializeServerSocket(): Sets up the server's socket for accepting client connections.
    • run(): The main loop of the server that waits for and processes client requests.

ClientHandler.hpp and ClientHandler.cpp

  • ClientHandler: Manages individual client connections and processes commands.
  • Functions:
    • processInput(): Reads input from the client and executes commands.
    • handleNickCommand(): Sets the client's nickname.
    • handleJoinCommand(): Adds the client to a channel.
    • handlePrivMsgCommand(): Sends a message to another user or a channel.

Channel.hpp and Channel.cpp

  • Channel: Manages a single IRC channel and handles users within the channel.
  • Functions:
    • broadcastMessage(): Sends a message to all users in the channel.
    • setMode(): Sets the mode (settings) of the channel.
    • isClientMember(): Checks if a user is a member of the channel.

How to Build

  1. Clone the repository:
    git clone https://github.com/bookseal/irc_server.git

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •