From 3db61bb54e408a6f5a9e2ff36a47803a7dc3ead3 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 26 May 2025 22:56:44 +0200 Subject: [PATCH] feat(channel): Adding the invited list to channels class and it getter --- include/channel.hpp | 4 +++- sources/channel/channel.cpp | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/channel.hpp b/include/channel.hpp index 0d7cb2f..a2ace76 100644 --- a/include/channel.hpp +++ b/include/channel.hpp @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/20 22:18:17 by rparodi #+# #+# */ -/* Updated: 2025/05/20 22:53:57 by rparodi ### ########.fr */ +/* Updated: 2025/05/26 22:54:58 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,6 +24,7 @@ class Channel { User *_owner; std::list _operators; std::list _users; + std::list _invited; public: // getters std::string getName() const; @@ -31,6 +32,7 @@ class Channel { User *getOwner() const; std::list getOperators() const; std::list getUsers() const; + std::list getInvited() const; bool isOperator(User *user) const; bool isUserInChannel(User *user) const; diff --git a/sources/channel/channel.cpp b/sources/channel/channel.cpp index c95ef88..b1b38ac 100644 --- a/sources/channel/channel.cpp +++ b/sources/channel/channel.cpp @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/20 22:43:24 by rparodi #+# #+# */ -/* Updated: 2025/05/26 18:10:43 by rparodi ### ########.fr */ +/* Updated: 2025/05/26 22:55:45 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -58,6 +58,15 @@ std::list Channel::getOperators() const { return this->_operators; } +/** + * @brief Get the list of the Invited in the channel + * + * @return list of Invited in the channel + */ +std::list Channel::getInvited() const { + return this->_invited; +} + /** * @brief Check if the user is an operator *