fix(cmds): sending the message ERR_NEEDMOREPARAMS (461)

This commit is contained in:
Raphael 2025-06-18 12:58:04 +02:00
parent f84492e175
commit 1c0e771dd5
12 changed files with 40 additions and 27 deletions

View file

@ -6,7 +6,7 @@
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/24 17:29:48 by rparodi #+# #+# */
/* Updated: 2025/06/17 16:58:06 by sben-tay ### ########.fr */
/* Updated: 2025/06/18 12:53:01 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -20,7 +20,8 @@ using namespace cmd;
e_code Ping::checkArgs() {
if (_args.size() < 2) {
WARNING_MSG("Not enough arguments for PING command");
std::string msg461 = ":localhost 461 " + this->_sender->getNickname() + " " + this->_command + " :Not enough parameters\r\n";
this->_sender->appendToWriteBuffer(msg461);
return ERR_NEEDMOREPARAMS;
}
return _PARSING_OK;