diff options
| author | 2022-03-28 17:22:51 +0100 | |
|---|---|---|
| committer | 2022-03-28 17:22:51 +0100 | |
| commit | e2b50c35511dcbbcdb5ede277ef1d7cb97252f6d (patch) | |
| tree | 9590f2075e7db8b81a13b6263e945359fdc630ab /src | |
| parent | Add support for matching against geolocation data with WHO. (diff) | |
Add the channels/ignore-chanfilter priv to the chanfilter module.
Closes #1971.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/m_chanfilter.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 14735b13d..a2b643917 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -67,9 +67,14 @@ class ModuleChanFilter : public Module 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) |
