1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 20:46:39 +02:00

Fixed bug #1141, reodered some access checks in cs_kick and cs_modes to hide who is on the channel

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2817 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2010-03-16 20:21:40 +00:00
parent f62eb16176
commit 2871c4701b
2 changed files with 5 additions and 6 deletions
+3 -4
View File
@@ -52,16 +52,15 @@ class CommandCSKick : public Command
notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan);
} else if (is_same ? !(u2 = u) : !(u2 = finduser(target))) {
notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, target);
} else if (!c->FindUser(u2)) {
notice_lang(Config.s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
} else if (!is_same ? !check_access(u, ci, CA_KICK) :
!check_access(u, ci, CA_KICKME)) {
} else if (!is_same ? !check_access(u, ci, CA_KICK) : !check_access(u, ci, CA_KICKME)) {
notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
} else if (!is_same && (ci->HasFlag(CI_PEACE))
&& (get_access(u2, ci) >= get_access(u, ci))) {
notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
} else if (is_protected(u2)) {
notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
} else if (!c->FindUser(u2)) {
notice_lang(Config.s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
} else {
if (ci->HasFlag(CI_SIGNKICK) || (ci->HasFlag(CI_SIGNKICK_LEVEL) && !check_access(u, ci, CA_SIGNKICK)))
ci->c->Kick(whosends(ci), u2, "%s (%s)", reason, u->nick.c_str());
+2 -2
View File
@@ -46,14 +46,14 @@ static CommandReturn do_util(User *u, ChannelMode *cm, const char *chan, const c
notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan);
else if (is_same ? !(u2 = u) : !(u2 = finduser(nick)))
notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, nick);
else if (!c->FindUser(u2))
notice_lang(Config.s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
else if (is_same ? !check_access(u, ci, levelself) : !check_access(u, ci, level))
notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
else if (!set && !is_same && (ci->HasFlag(CI_PEACE)) && (get_access(u2, ci) >= get_access(u, ci)))
notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
else if (!set && is_protected(u2) && !is_same)
notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
else if (!c->FindUser(u2))
notice_lang(Config.s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
else
{
if (set)