JOIN created. compile, need implement MSGPRIVATE

This commit is contained in:
Samy BEN TAYEB 2025-06-17 23:55:17 +02:00
parent 5d8b3d9dbd
commit 2b3b6654e7
7 changed files with 89 additions and 36 deletions

View file

@ -3,16 +3,19 @@
/* ::: :::::::: */
/* channel.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/20 22:43:24 by rparodi #+# #+# */
/* Updated: 2025/06/17 17:22:09 by rparodi ### ########.fr */
/* Updated: 2025/06/17 23:51:54 by sben-tay ### ########.fr */
/* */
/* ************************************************************************** */
#include "channel.hpp"
#include <iostream>
Channel::Channel(const std::string &name, User *owner, size_t maxUsers, bool needInvite)
:_name(name), _owner(owner), _maxUsers(maxUsers), _needInvite(needInvite) {}
/**
* @brief Get the name of the channel
*
@ -216,3 +219,8 @@ void Channel::removeOperator(User *user) {
}
}
void Channel::sendAllClientInAChannel(const std::string toSend) {
for(std::list<User *>::iterator it = this->_users.begin(); it != this->_users.end(); ++it) {
(*it)->appendToWriteBuffer(toSend);
}
}