From 46e71e2f509eb38166fafcc69931117f0f9b7798 Mon Sep 17 00:00:00 2001 From: Robby Date: Fri, 20 Apr 2018 16:28:28 +0200 Subject: Optionally do not notify users if their messages are blocked by certain modules (#1134). Closes #711.--- src/modules/m_muteban.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/modules/m_muteban.cpp') 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(); 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; } -- cgit v1.3.1-10-gc9f91