aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_noctcp.cpp
diff options
context:
space:
mode:
authorGravatar Matt Schatz2019-11-18 03:21:19 -0700
committerGravatar P. Powell2019-11-18 11:18:00 +0000
commit7ae4ca1a238ba7598ce2cd1b3de116cfc7a89588 (patch)
treefd9fae72d469aabcd249b2ccc59ee27ccbf840cb /src/modules/m_noctcp.cpp
parentChange Config->CaseMapping back when unloading. (diff)
downloadinspircd++-7ae4ca1a238ba7598ce2cd1b3de116cfc7a89588.tar.gz
inspircd++-7ae4ca1a238ba7598ce2cd1b3de116cfc7a89588.tar.bz2
inspircd++-7ae4ca1a238ba7598ce2cd1b3de116cfc7a89588.zip
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.
Diffstat (limited to 'src/modules/m_noctcp.cpp')
-rw-r--r--src/modules/m_noctcp.cpp6
1 files changed, 4 insertions, 2 deletions
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;