This commit is contained in:
2024-02-06 12:58:41 +01:00
parent 5c5b9c5b98
commit 47015f4ea6
2 changed files with 7 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
/* By: vvaas <vvaas@student.42angouleme.fr> +#+ +:+ +#+ */ /* By: vvaas <vvaas@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/21 10:35:52 by maldavid #+# #+# */ /* Created: 2024/01/21 10:35:52 by maldavid #+# #+# */
/* Updated: 2024/02/06 12:42:43 by vvaas ### ########.fr */ /* Updated: 2024/02/06 12:48:05 by vvaas ### ########.fr */
/* */ /* */
/******************************************************************************/ /******************************************************************************/

View File

@@ -6,7 +6,7 @@
/* By: vvaas <vvaas@student.42angouleme.fr> +#+ +:+ +#+ */ /* By: vvaas <vvaas@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/22 17:31:06 by maldavid #+# #+# */ /* Created: 2024/01/22 17:31:06 by maldavid #+# #+# */
/* Updated: 2024/02/06 12:36:19 by vvaas ### ########.fr */ /* Updated: 2024/02/06 12:56:32 by vvaas ### ########.fr */
/* */ /* */
/******************************************************************************/ /******************************************************************************/
@@ -373,7 +373,11 @@ namespace irc
client->sendCode(ERR_NONICKNAMEGIVEN, "KICK : No nickname given"); client->sendCode(ERR_NONICKNAMEGIVEN, "KICK : No nickname given");
return; return;
} }
if (msg.getArgs().size() < 2)
{
client->sendCode(ERR_NEEDMOREPARAMS, "KICK : Not enough parameters");
return ;
}
typedef std::vector<std::string>::iterator name_it; typedef std::vector<std::string>::iterator name_it;
std::vector<std::string> channels = unstd::split(msg.getArgs()[0], ','); std::vector<std::string> channels = unstd::split(msg.getArgs()[0], ',');
std::vector<std::string> users = unstd::split(msg.getArgs()[1], ','); std::vector<std::string> users = unstd::split(msg.getArgs()[1], ',');