aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_muteban.cpp
diff options
context:
space:
mode:
authorGravatar Robby2018-04-20 16:28:28 +0200
committerGravatar Peter Powell2018-04-20 15:28:28 +0100
commit46e71e2f509eb38166fafcc69931117f0f9b7798 (patch)
tree551fb4cc8463997e095b38fb4c9dcf35773cb598 /src/modules/m_muteban.cpp
parentTell the rehasher if an exception is thrown by a module on rehash. (diff)
Optionally do not notify users if their messages are blocked by certain modules (#1134).
Closes #711.
Diffstat (limited to 'src/modules/m_muteban.cpp')
-rw-r--r--src/modules/m_muteban.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp
index 045666f89..aebc00462 100644
--- a/src/modules/m_muteban.cpp
+++ b/src/modules/m_muteban.cpp
@@ -36,6 +36,13 @@ class ModuleQuietBan : public Module
Channel* chan = target.Get<Channel>();
if (chan->GetExtBanStatus(user, 'm') == MOD_RES_DENY && chan->GetPrefixValue(user) < VOICE_VALUE)
{
+ bool notifyuser = ServerInstance->Config->ConfValue("muteban")->getBool("notifyuser", true);
+ if (!notifyuser)
+ {
+ details.echooriginal = true;
+ return MOD_RES_DENY;
+ }
+
user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (you're muted)");
return MOD_RES_DENY;
}