IRC SERVER
The goal of this project is to make you write your own IRC server.
Channel.hpp File Reference
#include "./Client.hpp"
Include dependency graph for Channel.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Channel
 

Enumerations

enum  ChannelMode {
  CHANNEL_MODE_PRIVATE = 0, CHANNEL_MODE_SECRET = 1, CHANNEL_MODE_INVITE_ONLY = 2, CHANNEL_MODE_MODERATED = 3,
  CHANNEL_MODE_TOPIC_SETTABLE_BY_CHANNEL_OPERATOR_ONLY = 4, CHANNEL_MODE_CANT_SENT_MESSAGES_OUTSIDE = 5, CHANNEL_MODE_BAN_MASK = 6, CHANNEL_MODE_KEY = 7,
  CHANNEL_MODE_USER_LIMIT = 8, CHANNEL_MODE_OPERATOR = 9
}
 
enum  ClientMode { CLIENT_MODE_VOICE = 0, CLIENT_MODE_OPERATOR = 1 }
 

Enumeration Type Documentation

◆ ChannelMode

Enumerator
CHANNEL_MODE_PRIVATE 
CHANNEL_MODE_SECRET 
CHANNEL_MODE_INVITE_ONLY 
CHANNEL_MODE_MODERATED 
CHANNEL_MODE_TOPIC_SETTABLE_BY_CHANNEL_OPERATOR_ONLY 
CHANNEL_MODE_CANT_SENT_MESSAGES_OUTSIDE 
CHANNEL_MODE_BAN_MASK 
CHANNEL_MODE_KEY 
CHANNEL_MODE_USER_LIMIT 
CHANNEL_MODE_OPERATOR 

◆ ClientMode

enum ClientMode
Enumerator
CLIENT_MODE_VOICE 
CLIENT_MODE_OPERATOR 
Client::_status
ClientStatus _status
Definition: Client.hpp:40
Server::CLOSED
@ CLOSED
Definition: Server.hpp:61
Client::read
void read(void)
Definition: client.cpp:28
Server::_commands
std::map< std::string, Command * > _commands
Definition: Server.hpp:51
Server::_pfds
std::vector< pollfd > _pfds
Definition: Server.hpp:65
Pass
Definition: Pass.hpp:7
Server::Status
Status
Definition: Server.hpp:57
Message::Message
Message(std::string &buffer)
Construct a new Message:: Message object.
Definition: message.cpp:46
Client::_messagesSent
std::vector< Message > _messagesSent
Definition: Client.hpp:33
Server::~Server
~Server()
Definition: server.cpp:191
Command::execute
virtual void execute()=0
Ping
Definition: Ping.hpp:7
Invite
Definition: Invite.hpp:7
Message::_buffer
std::string _buffer
Definition: Message.hpp:15
Whois
Definition: Whois.hpp:7
Command
Definition: Command.hpp:7
to_lower
std::string to_lower(std::string str)
Definition: functions.cpp:29
Message::getCmd
std::string getCmd(void) const
Definition: message.cpp:74
Client::message
void message(char const *message)
Definition: client.cpp:15
Server::_channels
std::map< std::string, Channel * > _channels
Definition: Server.hpp:54
Command::setSender
void setSender(Client *sender)
Definition: Command.hpp:45
Server::is_running
bool is_running(void)
Definition: Server.hpp:75
Client::isAuthenticated
bool isAuthenticated(void) const
Definition: Client.hpp:132
C_MAGENTA
#define C_MAGENTA
Definition: Color.hpp:11
Command::missingOpe
void missingOpe(void)
Definition: Command.hpp:82
Names
Definition: Names.hpp:7
Command::hasOpe
bool hasOpe(void)
Definition: Command.hpp:57
Server::_clients
std::map< size_t, Client * > _clients
Definition: Server.hpp:48
DISCONNECTED
@ DISCONNECTED
Definition: config.hpp:15
split
std::vector< std::string > split(const std::string &str, const std::string &delimiters)
Definition: functions.cpp:37
Nick
Definition: Nick.hpp:7
Quit
Definition: Quit.hpp:7
Client::_message
Message * _message
Definition: Client.hpp:41
Server::hasPassword
bool hasPassword(void)
Definition: Server.hpp:79
SERVER_VERSION
#define SERVER_VERSION
Definition: config.hpp:9
Server::_fd
int _fd
Definition: Server.hpp:66
Kick
Definition: Kick.hpp:7
Server::deleteClient
void deleteClient(int fd)
Definition: Server.hpp:153
Part
Definition: Part.hpp:7
Notice
Definition: Notice.hpp:7
Help
Definition: Help.hpp:7
Server::Server
Server(std::string host, std::string port, std::string password)
Here we init the server instance.
Definition: server.cpp:162
Command::setServer
void setServer(Server *server)
Definition: Command.hpp:49
Client::_is_ope
bool _is_ope
Definition: Client.hpp:37
to_lower
std::string to_lower(std::string str)
Definition: functions.cpp:29
Server::_status
enum Server::Status _status
Mode
Definition: Mode.hpp:91
SERVER_NAME
#define SERVER_NAME
Definition: config.hpp:7
Join
Definition: Join.hpp:7
Command::parser
virtual std::vector< Message > parser(Message *message)
Definition: Command.hpp:74
Command::needsAuth
bool needsAuth(void)
Definition: Command.hpp:61
validate_args
bool validate_args(int argc, char **argv)
Definition: validation.cpp:15
Command::setMessage
void setMessage(Message *message)
Definition: Command.hpp:53
Message::getParams
std::map< size_t, std::string > getParams(void) const
Definition: message.cpp:79
is_number
bool is_number(const std::string &s)
Definition: functions.cpp:53
Message
Definition: Message.hpp:12
Topic
Definition: Topic.hpp:7
Command::validate
virtual bool validate(void)
Definition: Command.hpp:69
Client
Definition: Client.hpp:22
List
Definition: List.hpp:7
itoa
std::string itoa(int a)
Definition: functions.cpp:15
User
Definition: User.hpp:7
PrivMsg
Definition: PrivMsg.hpp:7
Client::_nick
std::string _nick
Definition: Client.hpp:26
Client::_fd
int _fd
Definition: Client.hpp:25
C_X
#define C_X
Definition: Color.hpp:4
MAX_CONNECTIONS
#define MAX_CONNECTIONS
Definition: config.hpp:4
MAX_BUFFER_SIZE
#define MAX_BUFFER_SIZE
Definition: config.hpp:5
C_BLUE
#define C_BLUE
Definition: Color.hpp:10