
Compile:
# without debug mode
make
# with debug mode
make debug
Launch the program:
# Usage
./ircserv <port> <password>
# Example
./ircserv 6667 !Lov3!rcS3rv
IRC clients:
IRC Protocols:
Miscellaneous:
- ℳíиí₸ΞḶ ⱤØṨΞ - Doc and tutorial
- IRCv3
- Evaluation sheet
Server class represents the IRC server itself.
- name
- address (IP or hostname)
- Port number
- List of connected clients
- List of available channels
- Start: Initialize the server and begin listening for incoming connections.
- AcceptClient: Accept and handle incoming client connections.
- BroadcastMessage: Send a message to all connected clients.
- ManageChannels: Create, delete, and manage IRC channels.
- HandleCommands: Parse and process IRC commands received from clients.
User class represents a connected user client.
- Client socket
- Nickname
- User modes (e.g., operator status)
- List of joined channels
- Connect: Establish a connection to the server.
- Authenticate: Authenticate the client (e.g., with a password).
- JoinChannel: Join an IRC channel.
- SendMessage: Send a message to a channel or another user.
- LeaveChannel: Leave an IRC channel.
- Disconnect: Close the client's connection to the server.
Operator class represents IRC operators with elevated privileges.
Inherits from Client and adds additional operator-specific attributes and methods.
- To be defined...
- KICK - Eject a client from the channel
- INVITE - Invite a client to a channel
- TOPIC - Change or view the channel topic
- MODE - Change the channel’s mode:
- i: Set/remove Invite-only channel
- t: Set/remove the restrictions of the TOPIC command to channel operators
- k: Set/remove the channel key (password)
- o: Give/take channel operator privilege 5 ft_irc Internet Relay Chat
- l: Set/remove the user limit to channel
Channel class represents an IRC channel (chat room).
- Channel name
- List of clients/users in the channel
- Channel modes (e.g., invite-only, moderated)
- AddClient: Add a client to the channel.
- RemoveClient: Remove a client from the channel.
- SendChannelMessage: Send a message to all clients in the channel.
- SetChannelModes: Set or modify channel-specific modes.
Message class can be used to encapsulate and parse IRC messages. You can create instances of this class to represent messages sent between clients and the server.
CommandParser class can be used to parse incoming IRC commands and route them to the appropriate handlers (e.g., join, part, privmsg).