From 47015f4ea6e27c075b9a17f33b0da19897e52415 Mon Sep 17 00:00:00 2001 From: Namonay Date: Tue, 6 Feb 2024 12:58:41 +0100 Subject: [PATCH] gg --- srcs/client.cpp | 2 +- srcs/server_functions.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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], ',');