summaryrefslogtreecommitdiff
path: root/src/commands/cmd_kick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_kick.cpp')
-rw-r--r--src/commands/cmd_kick.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/commands/cmd_kick.cpp b/src/commands/cmd_kick.cpp
index 39e2c4433..ab346d395 100644
--- a/src/commands/cmd_kick.cpp
+++ b/src/commands/cmd_kick.cpp
@@ -40,11 +40,16 @@ CmdResult CommandKick::Handle (const std::vector<std::string>& parameters, User
{
std::string reason;
Channel* c = ServerInstance->FindChan(parameters[0]);
- User* u = ServerInstance->FindNick(parameters[1]);
+ User* u;
if (ServerInstance->Parser->LoopCall(user, this, parameters, 1))
return CMD_SUCCESS;
+ if (IS_LOCAL(user))
+ u = ServerInstance->FindNickOnly(parameters[1]);
+ else
+ u = ServerInstance->FindNick(parameters[1]);
+
if (!u || !c)
{
user->WriteServ( "401 %s %s :No such nick/channel", user->nick.c_str(), u ? parameters[0].c_str() : parameters[1].c_str());