mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Merge branch 'insp3' into master.
This commit is contained in:
commit
c1b53e24d3
@ -27,6 +27,7 @@
|
||||
# - users/mass-message: allows opers with this priv to PRIVMSG and NOTICE to a server mask (e.g. NOTICE $*).
|
||||
# - users/samode-usermodes: allows opers with this priv to change the user modes of any other user using /SAMODE.
|
||||
# PERMISSIONS:
|
||||
# - channels/ignore-chanfilter: allows opers with this priv to be immune to channel filters.
|
||||
# - channels/ignore-delaymsg: allows opers with this priv to be immune to delaymsg restriction on a +d channel.
|
||||
# - channels/ignore-noctcp: allows opers with this priv to send a CTCP to a +C channel.
|
||||
# - channels/ignore-nonicks: allows opers with this priv to change their nick when on a +N channel.
|
||||
|
@ -36,11 +36,15 @@ ListModeBase::ListModeBase(Module* Creator, const std::string& Name, char modech
|
||||
void ListModeBase::DisplayList(User* user, Channel* channel)
|
||||
{
|
||||
ChanData* cd = extItem.Get(channel);
|
||||
if (cd)
|
||||
if (!cd || cd->list.empty())
|
||||
{
|
||||
for (const auto& item : cd->list)
|
||||
user->WriteNumeric(listnumeric, channel->name, item.mask, item.setter, item.time);
|
||||
this->DisplayEmptyList(user, channel);
|
||||
return;
|
||||
}
|
||||
|
||||
for (const auto& item : cd->list)
|
||||
user->WriteNumeric(listnumeric, channel->name, item.mask, item.setter, item.time);
|
||||
|
||||
user->WriteNumeric(endoflistnumeric, channel->name, endofliststring);
|
||||
}
|
||||
|
||||
|
@ -69,9 +69,14 @@ class ModuleChanFilter final
|
||||
|
||||
const ChanFilter::ListItem* Match(User* user, Channel* chan, const std::string& text)
|
||||
{
|
||||
ModResult res = CheckExemption::Call(exemptionprov, user, chan, "filter");
|
||||
if (!IS_LOCAL(user) || res == MOD_RES_ALLOW)
|
||||
return NULL;
|
||||
if (!IS_LOCAL(user))
|
||||
return NULL; // We don't handle remote users.
|
||||
|
||||
if (user->HasPrivPermission("channels/ignore-chanfilter"))
|
||||
return NULL; // The source is an exempt server operator.
|
||||
|
||||
if (CheckExemption::Call(exemptionprov, user, chan, "filter") == MOD_RES_ALLOW)
|
||||
return NULL; // The source matches an exemptchanops entry.
|
||||
|
||||
ListModeBase::ModeList* list = cf.GetList(chan);
|
||||
if (!list)
|
||||
|
Loading…
x
Reference in New Issue
Block a user