aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_nonicks.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_nonicks.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_nonicks.cpp')
-rw-r--r--src/modules/m_nonicks.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index a796495a8..df2d5db64 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -50,17 +50,17 @@ class ModuleNoNickChange : public Module
Channel* curr = (*i)->chan;
ModResult res = CheckExemption::Call(exemptionprov, user, curr, "nonick");
-
if (res == MOD_RES_ALLOW)
continue;
if (user->HasPrivPermission("channels/ignore-nonicks"))
continue;
- if (!curr->GetExtBanStatus(user, 'N').check(!curr->IsModeSet(nn)))
+ bool modeset = curr->IsModeSet(nn);
+ if (!curr->GetExtBanStatus(user, 'N').check(!modeset))
{
- user->WriteNumeric(ERR_CANTCHANGENICK, InspIRCd::Format("Cannot change nickname while on %s (+N is set)",
- curr->name.c_str()));
+ user->WriteNumeric(ERR_CANTCHANGENICK, InspIRCd::Format("Can't change nickname while on %s (%s)",
+ curr->name.c_str(), modeset ? "+N is set" : "you're extbanned"));
return MOD_RES_DENY;
}
}