From 23183603b7ea3b2a50ce082d573bef07ab794686 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 4 Apr 2014 18:30:02 +0200 Subject: Add REG_ALL checks to treat unregistered users as nonexistent in more cases --- src/commands/cmd_kick.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/cmd_kick.cpp') diff --git a/src/commands/cmd_kick.cpp b/src/commands/cmd_kick.cpp index 3c5fb0052..c497dd459 100644 --- a/src/commands/cmd_kick.cpp +++ b/src/commands/cmd_kick.cpp @@ -56,9 +56,9 @@ CmdResult CommandKick::Handle (const std::vector& parameters, User else u = ServerInstance->FindNick(parameters[1]); - if (!u || !c) + if ((!u) || (!c) || (u->registered != REG_ALL)) { - user->WriteServ( "401 %s %s :No such nick/channel", user->nick.c_str(), u ? parameters[0].c_str() : parameters[1].c_str()); + user->WriteServ( "401 %s %s :No such nick/channel", user->nick.c_str(), c ? parameters[1].c_str() : parameters[0].c_str()); return CMD_FAILURE; } -- cgit v1.2.3