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.
- 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.
- 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: 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: 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.
- Clone the repository:
git clone https://github.com/bookseal/irc_server.git