Topic cmd
This commit is contained in:
@@ -33,6 +33,7 @@ Channel& Channel::operator=(const Channel &other)
|
||||
name_ = other.name_;
|
||||
members_ = other.members_;
|
||||
operators_ = other.operators_;
|
||||
topic_ = other.topic_;
|
||||
isInviteOnly_ = other.isInviteOnly_;
|
||||
invitedMembers_ = other.invitedMembers_;
|
||||
}
|
||||
@@ -81,6 +82,14 @@ void Channel::broadcast(const std::string &msg, const std::map<int, User> &clien
|
||||
}
|
||||
}
|
||||
|
||||
// Topic
|
||||
|
||||
void Channel::setTopic(std::string content) { this->topic_ = content; }
|
||||
std::string Channel::getTopic() { return (this->topic_); }
|
||||
|
||||
|
||||
// Mode
|
||||
|
||||
void Channel::setMode(std::string& mode, std::string& args)
|
||||
{
|
||||
bool value;
|
||||
|
||||
@@ -28,6 +28,8 @@ class Channel
|
||||
std::set<int> members_;
|
||||
std::set<int> operators_;
|
||||
|
||||
std::string topic_;
|
||||
|
||||
bool isInviteOnly_;
|
||||
std::set<int> invitedMembers_;
|
||||
|
||||
@@ -43,6 +45,10 @@ class Channel
|
||||
std::string getName() const;
|
||||
const std::set<int> &getMembers() const;
|
||||
|
||||
// Topic
|
||||
void setTopic(std::string content);
|
||||
std::string getTopic();
|
||||
|
||||
// Users
|
||||
void addMember(int fd);
|
||||
void removeMember(int fd);
|
||||
|
||||
Reference in New Issue
Block a user