Starting Channel class
This commit is contained in:
@@ -20,30 +20,39 @@
|
||||
# include <unistd.h>
|
||||
# include <vector>
|
||||
# include <poll.h>
|
||||
|
||||
# include "../Client/Client.hpp"
|
||||
# include <map>
|
||||
# include <sstream>
|
||||
|
||||
# include "../Client/Client.hpp"
|
||||
# include "../Channel/Channel.hpp"
|
||||
|
||||
class Server
|
||||
{
|
||||
private:
|
||||
int port;
|
||||
std::string password;
|
||||
int server_fd;
|
||||
std::vector<pollfd> fds;
|
||||
std::map<int, Client> clients;
|
||||
int port;
|
||||
std::string password;
|
||||
int server_fd;
|
||||
std::vector<pollfd> fds;
|
||||
std::map<int, Client> clients;
|
||||
std::map<std::string, Channel> channels;
|
||||
|
||||
void acceptClient();
|
||||
void readClient(int fd);
|
||||
void removeClient(int fd);
|
||||
|
||||
void addChannel(std::string name);
|
||||
void deleteChannel();
|
||||
|
||||
void parseCommand(int fd, std::string line);
|
||||
|
||||
void cmd_pass(int fd, std::istringstream &ss);
|
||||
void cmd_nick(int fd, std::istringstream &ss);
|
||||
void cmd_user(int fd, std::istringstream &ss);
|
||||
|
||||
void cmd_join(int fd, std::istringstream &ss);
|
||||
void cmd_privmsg(int fd, std::istringstream &ss);
|
||||
void cmd_part(int fd, std::istringstream &ss);
|
||||
|
||||
public:
|
||||
Server();
|
||||
Server(int port, std::string password);
|
||||
|
||||
Reference in New Issue
Block a user