comments for pass.cpp

This commit is contained in:
aortigos
2026-05-10 22:45:40 +02:00
parent 2f995fe856
commit 7f40babccc
2 changed files with 4 additions and 2 deletions

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/05/10 22:06:22 by aortigos #+# #+# */
/* Updated: 2026/05/10 22:39:03 by aortigos ### ########.fr */
/* Updated: 2026/05/10 22:45:31 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -19,6 +19,7 @@ void Server::pass_cmd(User &client, std::istringstream &ss)
ss >> args;
if (client.isAuthenticated())
{
// Still need to find what server should reply to different errors
std::string res = "You are already authenticated";
send(client.getFd(), res.c_str(), res.size(), 0);
return ;
@@ -26,6 +27,7 @@ void Server::pass_cmd(User &client, std::istringstream &ss)
if (this->password_ == args)
client->authenticated = true;
else {
// Still need to find what server should reply to different errors
std::string res = "Invalid password";
send(client.getFd(), res.c_str(), res.size(), 0);
}

View File

@@ -48,7 +48,7 @@ Represents a connected IRC client.
### Fourth stage
- [ ]Client can create/connect to channels
- [ ] Client can create/connect to channels
- [ ] JOIN command (user can create channel)
- [ ] PRIVMSG command (send message to a channel)