28 if (targetClient == NULL) {
50 for (
size_t i = 0; i < channels.
size(); ++i) {
51 if (channels[i]->isOperator(targetClient)) {
54 channelList += channels[i]->getName();
55 if (i < channels.
size() - 1) {
59 if (!channelList.
empty()) {
74 params.push_back(idleSeconds.
str());
Manages channel members and states.
Manages client connection and state.
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 RPL_WHOISCHANNELS
#define ERR_NONICKNAMEGIVEN
Core IRC server implementation.
Handles the WHOIS command.
Represents an IRC client connected to the server.
const std::vector< Channel * > & getChannels() const
Gets the list of channels the client is in.
const std::string & getRealname() const
Gets the client's real name.
std::time_t getLastActivityTime() const
Gets the timestamp of the client's last activity.
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.
const std::string & getHostname() const
Gets the client's hostname.
const std::string & getUsername() const
Gets the client's username.
Abstract base class (interface) for all IRC commands.
Server * _server
Pointer to the IRC server instance.
Implements the core IRC server functionality as a Singleton.
Client * getClientByNickname(const std::string &nickname)
Retrieves a Client object by its nickname.
const std::string & getServerName() const
Gets the server's name.
void execute(Client *client, const std::vector< std::string > &args)
Executes the WHOIS command.
WhoisCommand(Server *server)
Constructs a WhoisCommand object.