diff --git a/srcs/client.cpp b/srcs/client.cpp index 69cd523..f742767 100644 --- a/srcs/client.cpp +++ b/srcs/client.cpp @@ -6,7 +6,7 @@ /* By: vvaas +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 */ /* */ /******************************************************************************/ diff --git a/srcs/server_functions.cpp b/srcs/server_functions.cpp index a6ba720..2726363 100644 --- a/srcs/server_functions.cpp +++ b/srcs/server_functions.cpp @@ -6,7 +6,7 @@ /* By: vvaas +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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"); return; } - + if (msg.getArgs().size() < 2) + { + client->sendCode(ERR_NEEDMOREPARAMS, "KICK : Not enough parameters"); + return ; + } typedef std::vector::iterator name_it; std::vector channels = unstd::split(msg.getArgs()[0], ','); std::vector users = unstd::split(msg.getArgs()[1], ',');