mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Allow rmode to remove all modes matching a specific user.
This commit is contained in:
parent
eb05259378
commit
4e52832bff
@ -148,8 +148,10 @@ a message stating they were removed from the channel and by whom.
|
||||
">
|
||||
|
||||
<helptopic key="rmode" title="/RMODE <channel> <mode> [<pattern>]" value="
|
||||
Removes listmodes from a channel, optionally matching a glob-based pattern.
|
||||
E.g. '/RMODE #channel b m:*' will remove all mute extbans on the channel.
|
||||
Removes list and prefix modes from the specified channel. If a pattern is
|
||||
specified then all modes matching the specified pattern will be removed. If
|
||||
removing a list mode and the pattern is the nick of an online user then all
|
||||
modes in the list matching the specified user will be removed.
|
||||
">
|
||||
|
||||
<helptopic key="hexip" title="/HEXIP <hex-ip|raw-ip>" value="
|
||||
|
@ -91,9 +91,10 @@ public:
|
||||
}
|
||||
else if ((lm = mh->IsListModeBase()) && ((ml = lm->GetList(chan)) != nullptr))
|
||||
{
|
||||
auto* targuser = parameters.size() > 2 ? ServerInstance->Users.FindNick(parameters[2]) : nullptr;
|
||||
for (const auto& entry : *ml)
|
||||
{
|
||||
if (InspIRCd::Match(entry.mask, pattern))
|
||||
if (targuser ? chan->CheckBan(targuser, entry.mask) : InspIRCd::Match(entry.mask, pattern))
|
||||
changelist.push_remove(mh, entry.mask);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user