diff options
author | Adam <Adam@anope.org> | 2013-04-06 15:57:02 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-06 15:59:38 -0500 |
commit | f77eb0a28279083f5a5b517e7925d6fc9bb9ce59 (patch) | |
tree | 3f917c296349537aa4f4d2eb1d45cbfc6ce8d8f4 /modules/commands/cs_ban.cpp | |
parent | 302a409136545ffb2e68cf09dc81077ed3e6dc99 (diff) |
Let non founders still /cs ban by wildcard mask, but limit the number of people it will kick
Diffstat (limited to 'modules/commands/cs_ban.cpp')
-rw-r--r-- | modules/commands/cs_ban.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp index e46bfcecb..06c8de95a 100644 --- a/modules/commands/cs_ban.cpp +++ b/modules/commands/cs_ban.cpp @@ -142,7 +142,7 @@ class CommandCSBan : public Command c->Kick(ci->WhoSends(), u2, "%s", reason.c_str()); } } - else if (u_access.HasPriv("FOUNDER")) + else { Log(LOG_COMMAND, source, this, ci) << "for " << target; @@ -156,6 +156,7 @@ class CommandCSBan : public Command } } + bool founder = u_access.HasPriv("FOUNDER"); int matched = 0, kicked = 0; for (Channel::ChanUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end;) { @@ -167,6 +168,8 @@ class CommandCSBan : public Command AccessGroup u2_access = ci->AccessFor(uc->user); + if (matched > 1 && !founder) + continue; if (u != uc->user && ci->HasExt("PEACE") && u2_access >= u_access) continue; else if (ci->c->MatchesList(uc->user, "EXCEPT")) @@ -187,8 +190,6 @@ class CommandCSBan : public Command else source.Reply(_("No users on %s match %s."), c->name.c_str(), target.c_str()); } - else - source.Reply(NICK_X_NOT_IN_USE, target.c_str()); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override |