41 for (
size_t i = 0; i < channelNames.
size(); ++i) {
Manages channel members and states.
Manages client connection and state.
std::vector< std::string > split(const std::string &s, char delimiter)
Splits a string into a vector of strings based on a delimiter.
Utility functions for command handling.
Handles the LIST command.
std::string formatReply(const std::string &serverName, const std::string &clientNickname, const std::string &replyCodeAndText)
Formats an IRC reply message without extra parameters.
Defines IRC numeric replies and error messages.
Core IRC server implementation.
const std::map< int, Client * > & getMembers() const
const std::string & getName() const
const std::string & getTopic() const
Represents an IRC client connected to the server.
virtual void sendMessage(const std::string &message) const
Sends a message to the client by appending it to the send buffer.
const std::string & getNickname() const
Gets the client's nickname.
Abstract base class (interface) for all IRC commands.
Server * _server
Pointer to the IRC server instance.
void execute(Client *client, const std::vector< std::string > &args)
Executes the LIST command.
ListCommand(Server *server)
Constructs a ListCommand object.
Implements the core IRC server functionality as a Singleton.
Channel * getChannel(const std::string &name)
Retrieves a Channel object by its name.
const std::map< std::string, Channel * > & getChannels() const
Gets a constant reference to the map of channels managed by the server.
const std::string & getServerName() const
Gets the server's name.