diff options
author | A_D <A-UNDERSCORE-D@users.noreply.github.com> | 2018-09-23 14:12:05 +0200 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-09-23 13:12:05 +0100 |
commit | f020429fd33ec1a7bf1114b2db1b2fd5d6bc1650 (patch) | |
tree | 9ee84f6de59b394256aafd79d191d938aa990f7f /src | |
parent | 0378d0f5826cfcd506595e60a44bf4af89d78bf8 (diff) |
Make kicknorejoin respect /INVITE (#1514).
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_kicknorejoin.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 7d0e7fb89..4d911e78b 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -24,6 +24,7 @@ #include "inspircd.h" +#include "modules/invite.h" enum { @@ -128,10 +129,12 @@ class KickRejoin : public ParamMode<KickRejoin, SimpleExtItem<KickRejoinData> > class ModuleKickNoRejoin : public Module { KickRejoin kr; + Invite::API invapi; public: ModuleKickNoRejoin() : kr(this) + , invapi(this) { } @@ -140,7 +143,7 @@ public: if (chan) { const KickRejoinData* data = kr.ext.get(chan); - if ((data) && (!data->canjoin(user))) + if ((data) && !invapi->IsInvited(user, chan) && (!data->canjoin(user))) { user->WriteNumeric(ERR_UNAVAILRESOURCE, chan, InspIRCd::Format("You must wait %u seconds after being kicked to rejoin (+J)", data->delay)); return MOD_RES_DENY; |