IRC SERVER
The goal of this project is to make you write your own IRC server.
Channel Class Reference

#include <Channel.hpp>

Public Member Functions

 Channel (std::string &name, std::string &password)
 
void setCreator (Client *creator)
 
void setTopic (std::string &topic)
 
void setPassword (std::string passwd)
 
std::string & getPassword (void)
 
std::string & getName (void)
 
std::string & getTopic (void)
 
ClientgetCreator (void)
 
time_t getCreatedAt (void)
 
ChannelMode getMode (void)
 
std::vector< ChannelModegetModes (void)
 
char getIdentifier (ChannelMode _mode)
 
std::string getStringModes (void)
 
size_t getUserLimit (void)
 
void setUserLimit (size_t limit)
 
std::vector< Client * > getClients (void) const
 
bool joined (Client *client)
 
bool isOwner (Client *client)
 
bool isOpe (Client *client)
 
bool isNormal (Client *client)
 
bool isVoice (Client *client)
 
bool isBanned (Client *client)
 
bool isInvited (Client *client)
 
bool isInviteOnly (void)
 
bool isSecret (void)
 
void addOpe (Client *client)
 
void removeOpe (Client *client)
 
void kick (Client *client)
 
void invite (Client *client)
 
void removeInvite (Client *client)
 
void addBanMask (std::string mask)
 
void removeBanMask (std::string mask)
 
std::string getModeString (void)
 
bool hasMode (ChannelMode mode)
 
void addMode (ChannelMode mode)
 
void removeMode (ChannelMode mode)
 
std::string getClientRoleString (Client *client)
 
void removeClientFromChannel (Client *client)
 
void broadcastMessage (std::string message)
 
bool isModerated (void)
 
bool hasKey (void)
 

Public Attributes

std::vector< Client * > _normal_clients
 
std::vector< Client * > _voice_clients
 
std::vector< Client * > _ope_clients
 
std::vector< std::pair< Client *, ClientMode > > _clients
 

Constructor & Destructor Documentation

◆ Channel()

Channel::Channel ( std::string &  name,
std::string &  password 
)
inline
Here is the call graph for this function:

Member Function Documentation

◆ addBanMask()

void Channel::addBanMask ( std::string  mask)
inline
Here is the caller graph for this function:

◆ addMode()

void Channel::addMode ( ChannelMode  mode)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addOpe()

void Channel::addOpe ( Client client)
inline
Here is the caller graph for this function:

◆ broadcastMessage()

void Channel::broadcastMessage ( std::string  message)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClientRoleString()

std::string Channel::getClientRoleString ( Client client)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClients()

std::vector<Client *> Channel::getClients ( void  ) const
inline
Here is the caller graph for this function:

◆ getCreatedAt()

time_t Channel::getCreatedAt ( void  )
inline

◆ getCreator()

Client* Channel::getCreator ( void  )
inline

◆ getIdentifier()

char Channel::getIdentifier ( ChannelMode  _mode)
inline
Here is the caller graph for this function:

◆ getMode()

ChannelMode Channel::getMode ( void  )
inline

◆ getModes()

std::vector<ChannelMode> Channel::getModes ( void  )
inline

◆ getModeString()

std::string Channel::getModeString ( void  )
inline
Here is the caller graph for this function:

◆ getName()

std::string& Channel::getName ( void  )
inline
Here is the caller graph for this function:

◆ getPassword()

std::string& Channel::getPassword ( void  )
inline
Here is the caller graph for this function:

◆ getStringModes()

std::string Channel::getStringModes ( void  )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTopic()

std::string& Channel::getTopic ( void  )
inline
Here is the caller graph for this function:

◆ getUserLimit()

size_t Channel::getUserLimit ( void  )
inline
Here is the caller graph for this function:

◆ hasKey()

bool Channel::hasKey ( void  )
inline

◆ hasMode()

bool Channel::hasMode ( ChannelMode  mode)
inline
Here is the caller graph for this function:

◆ invite()

void Channel::invite ( Client client)
inline
Here is the caller graph for this function:

◆ isBanned()

bool Channel::isBanned ( Client client)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInvited()

bool Channel::isInvited ( Client client)
inline
Here is the caller graph for this function:

◆ isInviteOnly()

bool Channel::isInviteOnly ( void  )
inline
Here is the caller graph for this function:

◆ isModerated()

bool Channel::isModerated ( void  )
inline
Here is the caller graph for this function:

◆ isNormal()

bool Channel::isNormal ( Client client)
inline

◆ isOpe()

bool Channel::isOpe ( Client client)
inline
Here is the caller graph for this function:

◆ isOwner()

bool Channel::isOwner ( Client client)
inline

◆ isSecret()

bool Channel::isSecret ( void  )
inline

◆ isVoice()

bool Channel::isVoice ( Client client)
inline
Here is the caller graph for this function:

◆ joined()

bool Channel::joined ( Client client)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kick()

void Channel::kick ( Client client)
inline
Here is the caller graph for this function:

◆ removeBanMask()

void Channel::removeBanMask ( std::string  mask)
inline
Here is the caller graph for this function:

◆ removeClientFromChannel()

void Channel::removeClientFromChannel ( Client client)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeInvite()

void Channel::removeInvite ( Client client)
inline

◆ removeMode()

void Channel::removeMode ( ChannelMode  mode)
inline
Here is the caller graph for this function:

◆ removeOpe()

void Channel::removeOpe ( Client client)
inline
Here is the caller graph for this function:

◆ setCreator()

void Channel::setCreator ( Client creator)
inline
Here is the caller graph for this function:

◆ setPassword()

void Channel::setPassword ( std::string  passwd)
inline
Here is the caller graph for this function:

◆ setTopic()

void Channel::setTopic ( std::string &  topic)
inline
Here is the caller graph for this function:

◆ setUserLimit()

void Channel::setUserLimit ( size_t  limit)
inline
Here is the caller graph for this function:

Member Data Documentation

◆ _clients

std::vector<std::pair<Client *, ClientMode> > Channel::_clients

◆ _normal_clients

std::vector<Client *> Channel::_normal_clients

◆ _ope_clients

std::vector<Client *> Channel::_ope_clients

◆ _voice_clients

std::vector<Client *> Channel::_voice_clients

The documentation for this class was generated from the following file: