From d52b0cc3c272e24ff9d4c4c04c6b10cd4b0ec74f Mon Sep 17 00:00:00 2001 From: Samy BEN TAYEB Date: Sat, 14 Jun 2025 22:44:48 +0200 Subject: [PATCH] auth updated, server recev PASS + USER + NICK --- sources/commands/cap.cpp | 4 ++-- sources/commands/commands.cpp | 6 +++--- sources/user/user.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/commands/cap.cpp b/sources/commands/cap.cpp index 47408ec..7a0418c 100644 --- a/sources/commands/cap.cpp +++ b/sources/commands/cap.cpp @@ -6,7 +6,7 @@ /* By: sben-tay +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/06/08 22:10:24 by sben-tay #+# #+# */ -/* Updated: 2025/06/12 13:06:50 by sben-tay ### ########.fr */ +/* Updated: 2025/06/14 22:26:07 by sben-tay ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,7 +28,7 @@ e_code Cap::checkArgs() { void cmd::Cap::execute() { if (this->checkArgs() != _PARSING_OK) return; - if (_args.size() >= 2 && _args[1] == "LS") { + if (_args.size() >= 2 && _args[1] == "ls") { std::string reply = "CAP * LS :\r\n"; _sender->appendToWriteBuffer(reply); DEBUG_MSG("Replied to CAP LS"); diff --git a/sources/commands/commands.cpp b/sources/commands/commands.cpp index 0f9a498..d0358cd 100644 --- a/sources/commands/commands.cpp +++ b/sources/commands/commands.cpp @@ -77,7 +77,7 @@ void cmd::dispatch(::User *user, Channel *channel, Server *server, std::string & WARNING_MSG("No command found in line: " << line); return; } - std::cout << command_name << std::endl; + DEBUG_MSG("Command Name = [" << command_name << "]"); switch (command_name[0]) { case 'c': if (command_name == "cap") { @@ -111,9 +111,9 @@ void cmd::dispatch(::User *user, Channel *channel, Server *server, std::string & break; case 'n': if (command_name == "nick") { - Nick(user, channel, server, line).execute(); + Nick(user, channel, server, line).execute(); } else if (command_name == "notice") { - Notice(user, channel, server, line).execute(); + Notice(user, channel, server, line).execute(); } break; case 'p': diff --git a/sources/user/user.cpp b/sources/user/user.cpp index 0959d01..7609fc4 100644 --- a/sources/user/user.cpp +++ b/sources/user/user.cpp @@ -6,7 +6,7 @@ /* By: sben-tay +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/21 20:37:12 by omoudni #+# #+# */ -/* Updated: 2025/06/12 18:04:12 by sben-tay ### ########.fr */ +/* Updated: 2025/06/14 22:34:59 by sben-tay ### ########.fr */ /* */ /* ************************************************************************** */ @@ -83,7 +83,7 @@ void User::appendToWriteBuffer(const std::string &data) // Check registration void User::checkRegistration() { - if (!_registered && _hasNick && _hasUser && _hasPass) + if (!_registered && _hasNick && _hasUser) // without _hasPass check { std::cout << "JE SUIS ENREGISTRE" << std::endl; _registered = true;