IRC SERVER
The goal of this project is to make you write your own IRC server.
|
Go to the documentation of this file.
5 #include "../Command.hpp"
13 _description =
"Mostrar los usuarios pertenecianentes a los canales";
14 _usage =
"names [<canales>]";
23 if (channel == NULL ||
26 std::vector<Client *> clients = channel->
getClients();
27 std::string users_str =
"";
28 for (
size_t i = 0; i < clients.size(); i++)
33 if (i == clients.size() - 1)
34 users_str += clients[i]->getNick();
36 users_str += clients[i]->getNick() +
" ";
47 std::vector<std::string> _ch_params =
split(p[0],
",");
48 for (
size_t i = 0; i < _ch_params.size(); i++)
Definition: Channel.hpp:26
void send_channel(std::string &name)
Definition: Names.hpp:20
void execute()
Definition: Names.hpp:42
std::string _description
Definition: Command.hpp:12
const std::string getNick(void) const
Definition: Client.hpp:142
std::string _name
Definition: Command.hpp:11
std::string getClientRoleString(Client *client)
Definition: Channel.hpp:356
Definition: Command.hpp:7
@ CHANNEL_MODE_SECRET
Definition: Channel.hpp:9
void message(char const *message)
Definition: client.cpp:15
std::map< std::string, Channel * > _channels
Definition: Server.hpp:54
#define RPL_ENDOFNAMES(servername, nick, channel)
Definition: Replies.hpp:85
Message * _message
Definition: Command.hpp:21
std::vector< std::string > split(const std::string &str, const std::string &delimiters)
Definition: functions.cpp:37
std::map< size_t, std::string > _example
Definition: Command.hpp:16
std::string getModeString(void)
Definition: Channel.hpp:311
std::vector< Client * > getClients(void) const
Definition: Channel.hpp:172
bool joined(Client *client)
Definition: Channel.hpp:183
std::map< size_t, std::string > getParams(void) const
Definition: message.cpp:79
Channel * getChannel(std::string &name)
Definition: Server.hpp:202
Names()
Definition: Names.hpp:10
#define RPL_NAMREPLY(servername, nick, symbol, channel, users)
Definition: Replies.hpp:83
std::string _usage
Definition: Command.hpp:13
bool hasMode(ChannelMode mode)
Definition: Channel.hpp:337
Client * _sender
Definition: Command.hpp:19
std::string _servername
Definition: Client.hpp:30
Server * _server
Definition: Command.hpp:20