From f020429fd33ec1a7bf1114b2db1b2fd5d6bc1650 Mon Sep 17 00:00:00 2001 From: A_D Date: Sun, 23 Sep 2018 14:12:05 +0200 Subject: Make kicknorejoin respect /INVITE (#1514). --- src/modules/m_kicknorejoin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 > 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; -- cgit v1.2.3