From 7ae4ca1a238ba7598ce2cd1b3de116cfc7a89588 Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Mon, 18 Nov 2019 03:21:19 -0700 Subject: Split the channel mode and extban replies. Tell the user when they are extbanned rather than incorrectly say that the channel mode is set. Refactored the logic in m_nonotice to match that of the others. --- src/modules/m_noctcp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/modules/m_noctcp.cpp') diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 45f805ac9..1eedac203 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -81,9 +81,11 @@ class ModuleNoCTCP : public Module if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU; - if (!c->GetExtBanStatus(user, 'C').check(!c->IsModeSet(nc))) + bool modeset = c->IsModeSet(nc); + if (!c->GetExtBanStatus(user, 'C').check(!modeset)) { - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send CTCP to channel (+C is set)"); + user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, InspIRCd::Format("Can't send CTCP to channel (%s)", + modeset ? "+C is set" : "you're extbanned")); return MOD_RES_DENY; } break; -- cgit v1.3.1-10-gc9f91