fix(cmd/mode): now topic mode is for protect not edit

This commit is contained in:
Raphael 2025-06-18 12:57:32 +02:00
parent a97800dd6e
commit f84492e175
3 changed files with 24 additions and 7 deletions

View file

@ -6,7 +6,7 @@
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/20 22:43:24 by rparodi #+# #+# */
/* Updated: 2025/06/18 01:17:37 by sben-tay ### ########.fr */
/* Updated: 2025/06/18 12:20:01 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -145,6 +145,13 @@ bool Channel::isUserInChannel(User *user) const {
return false;
}
bool Channel::getProtectTopic() const {
return this->_protectTopic;
}
void Channel::setProtectTopic(bool toSet) {
this->_protectTopic = toSet;
}
/**
* @brief Setter for the topic of the channel
*
@ -226,4 +233,4 @@ void Channel::sendAllClientInAChannel(const std::string toSend, User *sender) {
}
(*it)->appendToWriteBuffer(toSend);
}
}
}