diff --git a/src/commands/JoinCommand.cpp b/src/commands/JoinCommand.cpp index ddb38b6..5b387c3 100644 --- a/src/commands/JoinCommand.cpp +++ b/src/commands/JoinCommand.cpp @@ -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)); }