diff options
author | Matt Schatz <genius3000@g3k.solutions> | 2019-11-18 03:21:19 -0700 |
---|---|---|
committer | P. Powell <petpow@saberuk.com> | 2019-11-18 11:18:00 +0000 |
commit | 7ae4ca1a238ba7598ce2cd1b3de116cfc7a89588 (patch) | |
tree | fd9fae72d469aabcd249b2ccc59ee27ccbf840cb /src/modules/m_nonicks.cpp | |
parent | 36d7ee44a8c697a702211bb767d7a5c912300dfd (diff) |
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.cpp | 8 |
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; } } |