This commit is contained in:
iherman-
2026-05-23 21:50:54 +02:00
parent bed4006e90
commit 065f6ca10e
3 changed files with 9 additions and 3 deletions

View File

@@ -55,7 +55,12 @@ const std::set<int> &Channel::getMembers() const
}
// Members
void Channel::addMember(int fd) { this->members_.insert(fd); }
void Channel::addMember(int fd)
{
invitedMembers_.erase(fd);
this->members_.insert(fd);
}
void Channel::removeMember(int fd) { this->members_.erase(fd); }
bool Channel::hasMember(int fd) const { return (this->members_.count(fd) > 0); }

View File

@@ -58,7 +58,7 @@ class Channel
// modes
void setMode(std::string& mode, std::string& args);
void inviteMember(const User& client); // not implemented
void inviteMember(const User& client);
bool isInviteOnly() const;
bool isInvited(int fd) const;