IRC SERVER
The goal of this project is to make you write your own IRC server.
|
Go to the source code of this file.
|
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
} |
|
◆ 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
Enumerator |
---|
CLIENT_MODE_VOICE | |
CLIENT_MODE_OPERATOR | |
ClientStatus _status
Definition: Client.hpp:40
@ CLOSED
Definition: Server.hpp:61
void read(void)
Definition: client.cpp:28
std::map< std::string, Command * > _commands
Definition: Server.hpp:51
std::vector< pollfd > _pfds
Definition: Server.hpp:65
Status
Definition: Server.hpp:57
Message(std::string &buffer)
Construct a new Message:: Message object.
Definition: message.cpp:46
std::vector< Message > _messagesSent
Definition: Client.hpp:33
~Server()
Definition: server.cpp:191
std::string _buffer
Definition: Message.hpp:15
Definition: Command.hpp:7
std::string to_lower(std::string str)
Definition: functions.cpp:29
std::string getCmd(void) const
Definition: message.cpp:74
void message(char const *message)
Definition: client.cpp:15
std::map< std::string, Channel * > _channels
Definition: Server.hpp:54
void setSender(Client *sender)
Definition: Command.hpp:45
bool is_running(void)
Definition: Server.hpp:75
bool isAuthenticated(void) const
Definition: Client.hpp:132
#define C_MAGENTA
Definition: Color.hpp:11
void missingOpe(void)
Definition: Command.hpp:82
bool hasOpe(void)
Definition: Command.hpp:57
std::map< size_t, Client * > _clients
Definition: Server.hpp:48
@ DISCONNECTED
Definition: config.hpp:15
std::vector< std::string > split(const std::string &str, const std::string &delimiters)
Definition: functions.cpp:37
Message * _message
Definition: Client.hpp:41
bool hasPassword(void)
Definition: Server.hpp:79
#define SERVER_VERSION
Definition: config.hpp:9
int _fd
Definition: Server.hpp:66
void deleteClient(int fd)
Definition: Server.hpp:153
Server(std::string host, std::string port, std::string password)
Here we init the server instance.
Definition: server.cpp:162
void setServer(Server *server)
Definition: Command.hpp:49
bool _is_ope
Definition: Client.hpp:37
std::string to_lower(std::string str)
Definition: functions.cpp:29
enum Server::Status _status
#define SERVER_NAME
Definition: config.hpp:7
virtual std::vector< Message > parser(Message *message)
Definition: Command.hpp:74
bool needsAuth(void)
Definition: Command.hpp:61
bool validate_args(int argc, char **argv)
Definition: validation.cpp:15
void setMessage(Message *message)
Definition: Command.hpp:53
std::map< size_t, std::string > getParams(void) const
Definition: message.cpp:79
bool is_number(const std::string &s)
Definition: functions.cpp:53
Definition: Message.hpp:12
virtual bool validate(void)
Definition: Command.hpp:69
Definition: Client.hpp:22
std::string itoa(int a)
Definition: functions.cpp:15
Definition: PrivMsg.hpp:7
std::string _nick
Definition: Client.hpp:26
int _fd
Definition: Client.hpp:25
#define C_X
Definition: Color.hpp:4
#define MAX_CONNECTIONS
Definition: config.hpp:4
#define MAX_BUFFER_SIZE
Definition: config.hpp:5
#define C_BLUE
Definition: Color.hpp:10