diff options
| author | 2019-12-08 17:38:47 +0000 | |
|---|---|---|
| committer | 2019-12-08 17:47:07 +0000 | |
| commit | 034dad6ab0df48172a70de70a9d0de4a9092112e (patch) | |
| tree | 0e852f3554dbce37d8e2e360fa099148155e8cab /src/modules/m_nokicks.cpp | |
| parent | Move the nationalchars locale files to the docs directory. (diff) | |
| parent | Clean up the initialisation of the InspIRCd class. (diff) | |
Merge branch 'insp3' into master.
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 ff113db35..14402e6d7 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) 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; |
