diff options
Diffstat (limited to 'src/modules/m_nonotice.cpp')
-rw-r--r-- | src/modules/m_nonotice.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index bff5bba2d..4ee5f8bff 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -55,11 +55,15 @@ class ModuleNoNotice : public Module if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU; - bool modeset = c->IsModeSet(nt); - if (!c->GetExtBanStatus(user, 'T').check(!modeset)) + if (c->IsModeSet(nt)) { - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, InspIRCd::Format("Can't send NOTICE to channel (%s)", - modeset ? "+T is set" : "you're extbanned")); + user->WriteNumeric(Numerics::CannotSendTo(c, "notices", &nt)); + return MOD_RES_DENY; + } + + if (c->GetExtBanStatus(user, 'T') == MOD_RES_DENY) + { + user->WriteNumeric(Numerics::CannotSendTo(c, "notices", 'T', "nonotice")); return MOD_RES_DENY; } } |