diff options
author | Adam <Adam@anope.org> | 2010-07-17 17:32:38 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-07-17 17:32:38 -0400 |
commit | f9cd3f42385552f5889ccd293eab0faa02212b34 (patch) | |
tree | bd1f394317994994e5504b822ef5f010c8a5682f /modules/core/cs_access.cpp | |
parent | a22f8d3b2de88b9bb6f80f0c2780846ae23ab389 (diff) |
Allow clearing of access lists while in XOP
Diffstat (limited to 'modules/core/cs_access.cpp')
-rw-r--r-- | modules/core/cs_access.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp index 514771d57..a6ae88d37 100644 --- a/modules/core/cs_access.cpp +++ b/modules/core/cs_access.cpp @@ -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); |