1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 22:26:39 +02:00

Allow clearing of access lists while in XOP

This commit is contained in:
Adam
2010-07-17 17:32:38 -04:00
parent a22f8d3b2d
commit f9cd3f4238
+4 -3
View File
@@ -397,14 +397,15 @@ class CommandCSAccess : public Command
ChannelInfo *ci = cs_findchan(chan);
bool is_list = cmd == "LIST" || cmd == "VIEW";
bool is_clear = cmd == "CLEAR";
/* If LIST, we don't *require* any parameters, but we can take any.
* If DEL, we require a nick and no level.
* Else (ADD), we require a level (which implies a nick). */
if (is_list || cmd == "CLEAR" ? 0 : (cmd == "DEL" ? (!nick || s) : !s))
if (is_list || is_clear ? 0 : (cmd == "DEL" ? (!nick || s) : !s))
this->OnSyntaxError(u, cmd);
/* We still allow LIST in xOP mode, but not others */
else if ((ci->HasFlag(CI_XOP)) && !is_list)
/* We still allow LIST and CLEAR in xOP mode, but not others */
else if ((ci->HasFlag(CI_XOP)) && !is_list && !is_clear)
{
if (ModeManager::FindChannelModeByName(CMODE_HALFOP))
notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_XOP_HOP, Config.s_ChanServ);