Skip to content

Commit

Permalink
fix(join command): Send rpl topic on user joining when is set
Browse files Browse the repository at this point in the history
  • Loading branch information
jdomingu98 committed Apr 24, 2024
1 parent b497f99 commit 34a6cb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/JoinCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ void JoinCommand::sendMessages(int clientFd, Channel &channel) const {
server.sendMessage(channelUsers[i].getFd(),
JOIN_MSG(nickname, username, hostname, channelName));
}
if (!channel.getTopic().empty())
server.sendMessage(clientFd, RPL_TOPIC(nickname, username, hostname, channelName, channel.getTopic()));
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 34a6cb2

Please sign in to comment.