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"
15 _example[0] =
"kick <canal> <usuario> :[<comentario>]";
17 _example[2] =
"kick #hola user1,user2";
18 _example[3] =
"kick #hola user1,user2 :coment";
25 if (p.size() > 3 || p.size() < 2)
33 std::vector<std::string> _user_params =
split(p[1],
",");
56 for (
size_t i = 0; i < _user_params.size(); i++)
65 if (!channel->
joined(user))
85 std::vector<std::string> _user_params =
split(p[1],
",");
88 for (
size_t i = 0; i < _user_params.size(); i++)
Definition: Channel.hpp:26
std::string & getName(void)
Definition: Channel.hpp:82
bool isOpe(Client *client)
Definition: Channel.hpp:195
#define ERR_NOSUCHCHANNEL(servername, nick, channel)
Definition: Replies.hpp:107
void execute()
Definition: Kick.hpp:82
std::string _description
Definition: Command.hpp:12
void kick(Client *client)
Definition: Channel.hpp:265
const std::string getNick(void) const
Definition: Client.hpp:142
std::string _name
Definition: Command.hpp:11
Definition: Command.hpp:7
std::string getCmd(void) const
Definition: message.cpp:74
void message(char const *message)
Definition: client.cpp:15
#define RPL_CUSTOM_KICK(user, channel, nick, reason)
Definition: Replies.hpp:188
#define ERR_BADCHANMASK(servername, nick)
Definition: Replies.hpp:151
bool validate(void)
Definition: Kick.hpp:21
#define ERR_NOSUCHNICK(servername, nick)
Definition: Replies.hpp:104
Message * _message
Definition: Command.hpp:21
std::vector< std::string > split(const std::string &str, const std::string &delimiters)
Definition: functions.cpp:37
#define ERR_CHANOPRIVSNEEDED(servername, nick, channel)
Definition: Replies.hpp:154
#define ERR_NEEDMOREPARAMS(servername, nick, command)
Definition: Replies.hpp:131
std::map< size_t, std::string > _example
Definition: Command.hpp:16
#define ERR_NOTONCHANNEL(servername, nick, channel)
Definition: Replies.hpp:126
#define ERR_USERNOTINCHANNEL(servername, nick, channel)
Definition: Replies.hpp:124
void broadcastMessage(std::string message)
Definition: Channel.hpp:384
Client * getClient(std::string const &name)
Definition: Server.hpp:140
bool joined(Client *client)
Definition: Channel.hpp:183
std::map< size_t, std::string > getParams(void) const
Definition: message.cpp:79
Kick()
Definition: Kick.hpp:10
Channel * getChannel(std::string &name)
Definition: Server.hpp:202
Definition: Client.hpp:22
std::string _usage
Definition: Command.hpp:13
const std::string getUserId(void) const
Definition: Client.hpp:162
Client * _sender
Definition: Command.hpp:19
std::string _servername
Definition: Client.hpp:30
Server * _server
Definition: Command.hpp:20