One file per command
This commit is contained in:
@@ -23,6 +23,14 @@
|
||||
|
||||
# include "../Client/Client.hpp"
|
||||
# include <map>
|
||||
# include <sstream>
|
||||
|
||||
|
||||
const std::string ERR_PASSWORD = "ERROR :Password incorrect\r\n";
|
||||
const std::string ERR_NONICK = "ERROR :No nick given\r\n";
|
||||
const std::string ERR_NOPASS = "ERROR :Authenticate first\r\n";
|
||||
const std::string ERR_REREGISTER = "462 :You may not reregister\r\n";
|
||||
const std::string ERR_NOUSER = "ERROR :No username given\r\n";
|
||||
|
||||
class Server
|
||||
{
|
||||
@@ -37,6 +45,12 @@ class Server
|
||||
void readClient(int fd);
|
||||
void removeClient(int fd);
|
||||
|
||||
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);
|
||||
|
||||
public:
|
||||
Server();
|
||||
Server(int port, std::string password);
|
||||
|
||||
Reference in New Issue
Block a user