Improving commands and added quit
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
# include <iostream>
|
||||
# include <sys/socket.h>
|
||||
# include <set>
|
||||
|
||||
class User
|
||||
{
|
||||
@@ -28,6 +29,8 @@ class User
|
||||
bool authenticated;
|
||||
bool registered;
|
||||
|
||||
std::set<std::string> channels_;
|
||||
|
||||
public:
|
||||
User();
|
||||
User(int fd);
|
||||
@@ -37,6 +40,12 @@ class User
|
||||
|
||||
void send(const std::string &msg);
|
||||
|
||||
// Channels
|
||||
void joinChannel(const std::string &channel);
|
||||
void leaveChannel( const std::string &channel);
|
||||
bool isInChannel(const std::string &channel) const;
|
||||
const std::set<std::string> &getChannels() const;
|
||||
|
||||
// Getters
|
||||
|
||||
int getFd() const;
|
||||
|
||||
Reference in New Issue
Block a user