pass has been refactorized and nick command init

This commit is contained in:
aortigos
2026-05-14 20:40:26 +02:00
parent d438bb828a
commit 18f813ed37
4 changed files with 39 additions and 11 deletions

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/05/06 17:19:12 by iherman- #+# #+# */
/* Updated: 2026/05/14 17:00:22 by aortigos ### ########.fr */
/* Updated: 2026/05/14 20:35:49 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -113,6 +113,7 @@ Server::Server(int port, const std::string& password) :
// Add all new commands to commands_ here
commands_["PASS"] = &Server::pass_cmd;
commands_["NICK"] = &Server::nick_cmd;
std::cout << "Server port: " << port_
<< "\nServer Password: " << password_

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/05/06 17:18:11 by iherman- #+# #+# */
/* Updated: 2026/05/14 16:58:31 by aortigos ### ########.fr */
/* Updated: 2026/05/14 20:35:22 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -24,6 +24,8 @@
# include "../User/User.hpp"
# define SERVER_NAME irc.server
# define PORT_DEFAULT 9898
class Server
@@ -53,6 +55,7 @@ class Server
// Commands
void pass_cmd(User &client, std::istringstream &ss);
void nick_cmd(User &client, std::istringstream &ss);
public: