summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_kicknorejoin.cpp5
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;