Skip to content

Commit

Permalink
Fix opmoderated messages appearing in the channel history.
Browse files Browse the repository at this point in the history
  • Loading branch information
SadieCat committed May 6, 2024
1 parent 4b6af49 commit c27a6c4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/modules/m_opmoderated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ModuleOpModerated final
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))
Expand All @@ -54,14 +54,7 @@ class ModuleOpModerated final
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;
}
Expand Down

0 comments on commit c27a6c4

Please sign in to comment.