summaryrefslogtreecommitdiff
path: root/src/commands/cmd_kick.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-04-04 18:30:02 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-04-04 18:30:02 +0200
commit23183603b7ea3b2a50ce082d573bef07ab794686 (patch)
treee6076a2aeeac67c6dca294f83b30f9d326d24d70 /src/commands/cmd_kick.cpp
parent957676efd8e1330f1e1314046376f3d9dd1eab18 (diff)
Add REG_ALL checks to treat unregistered users as nonexistent in more cases
Diffstat (limited to 'src/commands/cmd_kick.cpp')
-rw-r--r--src/commands/cmd_kick.cpp4
1 files changed, 2 insertions, 2 deletions
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<std::string>& 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;
}