diff options
| author | 2019-11-18 03:21:19 -0700 | |
|---|---|---|
| committer | 2019-11-18 11:18:00 +0000 | |
| commit | 7ae4ca1a238ba7598ce2cd1b3de116cfc7a89588 (patch) | |
| tree | fd9fae72d469aabcd249b2ccc59ee27ccbf840cb /src/modules/m_nokicks.cpp | |
| parent | Change Config->CaseMapping back when unloading. (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_nokicks.cpp')
| -rw-r--r-- | src/modules/m_nokicks.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index 6cd91c55b..20951c18f 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -39,10 +39,12 @@ class ModuleNoKicks : public Module ModResult OnUserPreKick(User* source, Membership* memb, const std::string &reason) CXX11_OVERRIDE { - if (!memb->chan->GetExtBanStatus(source, 'Q').check(!memb->chan->IsModeSet(nk))) + bool modeset = memb->chan->IsModeSet(nk); + if (!memb->chan->GetExtBanStatus(source, 'Q').check(!modeset)) { // Can't kick with Q in place, not even opers with override, and founders - source->WriteNumeric(ERR_CHANOPRIVSNEEDED, memb->chan->name, InspIRCd::Format("Can't kick user %s from channel (+Q is set)", memb->user->nick.c_str())); + source->WriteNumeric(ERR_CHANOPRIVSNEEDED, memb->chan->name, InspIRCd::Format("Can't kick user %s from channel (%s)", + memb->user->nick.c_str(), modeset ? "+Q is set" : "you're extbanned")); return MOD_RES_DENY; } return MOD_RES_PASSTHRU; |
