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.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/commands/cmd_kick.cpp b/src/commands/cmd_kick.cpp
index 87ee1da6d..ecbdbad1e 100644
--- a/src/commands/cmd_kick.cpp
+++ b/src/commands/cmd_kick.cpp
@@ -62,10 +62,19 @@ CmdResult CommandKick::Handle (const std::vector<std::string>& parameters, User
return CMD_FAILURE;
}
- if ((IS_LOCAL(user)) && (!c->HasUser(user)) && (!ServerInstance->ULine(user->server)))
+ if (IS_LOCAL(user))
{
- user->WriteServ( "442 %s %s :You're not on that channel!", user->nick.c_str(), parameters[0].c_str());
- return CMD_FAILURE;
+ if (!c->HasUser(user))
+ {
+ user->WriteServ( "442 %s %s :You're not on that channel!", user->nick.c_str(), parameters[0].c_str());
+ return CMD_FAILURE;
+ }
+
+ if (ServerInstance->ULine(u->server))
+ {
+ user->WriteNumeric(ERR_CHANOPRIVSNEEDED, "%s %s :You may not kick a u-lined client", user->nick.c_str(), c->name.c_str());
+ return CMD_FAILURE;
+ }
}
if (parameters.size() > 2)