Manages client connection and state.
Handles the PASS 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.
#define ERR_PASSWDMISMATCH
#define ERR_ALREADYREGISTRED
#define ERR_NEEDMOREPARAMS
Core IRC server implementation.
Represents an IRC client connected to the server.
bool isRegistered() const
Checks if the client is registered.
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.
void setAuthenticated(bool value)
Sets the client's authentication status.
Abstract base class (interface) for all IRC commands.
Server * _server
Pointer to the IRC server instance.
PassCommand(Server *server)
Constructs a PassCommand object.
void execute(Client *client, const std::vector< std::string > &args)
Executes the PASS command.
Implements the core IRC server functionality as a Singleton.
const std::string & getPassword() const
Gets the server's password.
const std::string & getServerName() const
Gets the server's name.