Skip to content

Commit

Permalink
Merge pull request #116 from jdomingu98/112-join-bug-mensaje-incorrec…
Browse files Browse the repository at this point in the history
…to-cuando-usuario-entra-a-canal

Bug JOIN_MSG
  • Loading branch information
Atrujillo02 authored Apr 24, 2024
2 parents c78112d + 2436639 commit b497f99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions includes/libsUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
# define RPL_INVITING(nickname, username, hostname, channel) USER_ID(nickname, username, hostname) + " " + (channel) + " " + (nickname)
// # define RPL_AWAY(nickname, username, hostname, awayMessage) USER_ID(nickname, username, hostname) + " " + (nickname) + " :" + (awayMessage)
// # define RPL_CHANNEL_MODE_IS(nickname, username, hostname, channel, mode, modeParams) USER_ID(nickname, username, hostname) + " " + (channel) + " " + (mode) + " " + (modeParams)
# define RPL_END_OF_NAMES(nickname, usermane, hostname, channel) USER_ID(nickname, username, hostname) + " " + (channel) + " :End of /NAMES list."
# define RPL_END_OF_NAMES(nickname, usermane, hostname, channel) USER_ID(nickname, username, hostname) + " " + (channel) + " :End of NAMES list."

# define ERROR_MSG(errorCode, nickname, errorMsg) ":irc.ft_messenger.net " + (errorCode) + " " + (nickname) + " " + (errorMsg) + "."

# define USER_ID(nickname, username, hostname) ":" + (nickname) + "!" + (username) + "@" + (hostname)
# define JOIN_MSG(nickname, username, hostname, channelName) USER_ID(nickname, username, hostname) + " JOIN :" + (channelName)
# define JOIN_MSG(nickname, username, hostname, channelName) USER_ID(nickname, username, hostname) + " JOIN " + (channelName)
# define PART_MSG(nickname, username, hostname, channelName) USER_ID(nickname, username, hostname) + " PART " + (channelName)
# define QUIT_MSG(nickname, username, hostname, message) USER_ID(nickname, username, hostname) + " QUIT :" + (message)
# define KICK_MSG(nickname, username, hostname, channelName, kickedUser, comment) USER_ID(nickname, username, hostname) + " KICK " + (channelName) + " " + (kickedUser) + " :" + (comment)
Expand Down
3 changes: 1 addition & 2 deletions src/commands/JoinCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ void JoinCommand::sendMessages(int clientFd, Channel &channel) const {

for (size_t i = 0; i < channelUsers.size(); i++) {
server.sendMessage(channelUsers[i].getFd(),
JOIN_MSG(channelUsers[i].getNickname(), channelUsers[i].getUsername(),
channelUsers[i].getHostname(), channelName));
JOIN_MSG(nickname, username, hostname, channelName));
}
server.sendMessage(clientFd, rplNamReply(nickname, username, hostname, channel));
server.sendMessage(clientFd, RPL_END_OF_NAMES(nickname, username, hostname, channelName));
Expand Down

0 comments on commit b497f99

Please sign in to comment.