diff options
| author | 2023-11-15 22:29:00 +0000 | |
|---|---|---|
| committer | 2024-05-06 17:18:07 +0100 | |
| commit | c27a6c49008f10f4d282489f0b73f8cbf9f42eb3 (patch) | |
| tree | d1b6d548b775258e9b72f0bbc2ce4890d69d3f04 | |
| parent | Allow mutating the status message type in OnUserPre(Tag)Message. (diff) | |
Fix opmoderated messages appearing in the channel history.
| -rw-r--r-- | src/modules/m_opmoderated.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/modules/m_opmoderated.cpp b/src/modules/m_opmoderated.cpp index f69794b8d..9427e8153 100644 --- a/src/modules/m_opmoderated.cpp +++ b/src/modules/m_opmoderated.cpp @@ -30,7 +30,7 @@ private: ExtBan::Acting extban; SimpleChannelMode mode; - ModResult HandleMessage(User* user, const MessageTarget& target, CUList& exemptions) + ModResult HandleMessage(User* user, MessageTarget& target, CUList& exemptions) { // We only handle messages from local users. if (!IS_LOCAL(user)) @@ -54,14 +54,7 @@ private: return MOD_RES_PASSTHRU; if (!extban.GetStatus(user, chan).check(!chan->IsModeSet(mode))) - { - // Add any unprivileged users to the exemption list. - for (const auto& [u, memb] : chan->GetUsers()) - { - if (memb->GetRank() < OP_VALUE) - exemptions.insert(u); - } - } + target.status = '@'; return MOD_RES_PASSTHRU; } |
