From 84763d96ccd49e2ded3fec9fbf89574a16b266e8 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 26 May 2025 22:57:25 +0200 Subject: [PATCH] fix(cmd/join): remove the '#' in channel name --- sources/commands/invite.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sources/commands/invite.cpp b/sources/commands/invite.cpp index fb2de57..b2e4612 100644 --- a/sources/commands/invite.cpp +++ b/sources/commands/invite.cpp @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/24 17:29:48 by rparodi #+# #+# */ -/* Updated: 2025/05/26 18:17:15 by rparodi ### ########.fr */ +/* Updated: 2025/05/26 22:50:04 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,7 +17,7 @@ using namespace cmd; bool Invite::checkArgs() { - if (_args.size() < 2) { + if (_args.size() < 3) { WARNING_MSG("Not enough arguments for INVITE command"); return false; } @@ -31,7 +31,8 @@ bool Invite::checkArgs() { WARNING_MSG("Channel not found for INVITE command"); INFO_MSG("You can only invite users to channels you are in"); return false; - } + } else + _args.at(1).erase(0, 1); if (searchList(_cTarget->getOperators(), _sender->getName()) != NULL) { WARNING_MSG("You are not an operator in the channel for INVITE command"); return false;