aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_muteban.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-07-06 18:18:35 +0100
committerGravatar Sadie Powell2023-07-06 18:29:00 +0100
commitb0b5283d27aa8c9600fee4e87af3e502c1a9f4b1 (patch)
treee0df54eacf9a362790f5369656a722075e4a46b4 /src/modules/m_muteban.cpp
parentMerge branch 'insp3' into master. (diff)
If a user is (mute)banned then also hide their part message.
Diffstat (limited to 'src/modules/m_muteban.cpp')
-rw-r--r--src/modules/m_muteban.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp
index d1bb97660..cb958f3cb 100644
--- a/src/modules/m_muteban.cpp
+++ b/src/modules/m_muteban.cpp
@@ -78,6 +78,15 @@ public:
{
return HandleMessage(user, target, details.echo_original);
}
+
+ void OnUserPart(Membership* memb, std::string& partmessage, CUList& excepts) override
+ {
+ if (!IS_LOCAL(memb->user))
+ return;
+
+ if (extban.GetStatus(memb->user, memb->chan) == MOD_RES_DENY)
+ partmessage.clear();
+ }
};
MODULE_INIT(ModuleQuietBan)