auth updated, server recev PASS + USER + NICK
This commit is contained in:
parent
479fc3c6c5
commit
d52b0cc3c2
3 changed files with 7 additions and 7 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/06/08 22:10:24 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() {
|
void cmd::Cap::execute() {
|
||||||
if (this->checkArgs() != _PARSING_OK)
|
if (this->checkArgs() != _PARSING_OK)
|
||||||
return;
|
return;
|
||||||
if (_args.size() >= 2 && _args[1] == "LS") {
|
if (_args.size() >= 2 && _args[1] == "ls") {
|
||||||
std::string reply = "CAP * LS :\r\n";
|
std::string reply = "CAP * LS :\r\n";
|
||||||
_sender->appendToWriteBuffer(reply);
|
_sender->appendToWriteBuffer(reply);
|
||||||
DEBUG_MSG("Replied to CAP LS");
|
DEBUG_MSG("Replied to CAP LS");
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ void cmd::dispatch(::User *user, Channel *channel, Server *server, std::string &
|
||||||
WARNING_MSG("No command found in line: " << line);
|
WARNING_MSG("No command found in line: " << line);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::cout << command_name << std::endl;
|
DEBUG_MSG("Command Name = [" << command_name << "]");
|
||||||
switch (command_name[0]) {
|
switch (command_name[0]) {
|
||||||
case 'c':
|
case 'c':
|
||||||
if (command_name == "cap") {
|
if (command_name == "cap") {
|
||||||
|
|
@ -111,9 +111,9 @@ void cmd::dispatch(::User *user, Channel *channel, Server *server, std::string &
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
if (command_name == "nick") {
|
if (command_name == "nick") {
|
||||||
Nick(user, channel, server, line).execute();
|
Nick(user, channel, server, line).execute();
|
||||||
} else if (command_name == "notice") {
|
} else if (command_name == "notice") {
|
||||||
Notice(user, channel, server, line).execute();
|
Notice(user, channel, server, line).execute();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/05/21 20:37:12 by omoudni #+# #+# */
|
/* 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
|
// Check registration
|
||||||
void User::checkRegistration()
|
void User::checkRegistration()
|
||||||
{
|
{
|
||||||
if (!_registered && _hasNick && _hasUser && _hasPass)
|
if (!_registered && _hasNick && _hasUser) // without _hasPass check
|
||||||
{
|
{
|
||||||
std::cout << "JE SUIS ENREGISTRE" << std::endl;
|
std::cout << "JE SUIS ENREGISTRE" << std::endl;
|
||||||
_registered = true;
|
_registered = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue