summaryrefslogtreecommitdiff
path: root/src/modules/m_override.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-11-02 13:28:55 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-11-02 13:28:55 +0100
commit30fc51c6ddca487a1b89da9ab0ab59da003aee36 (patch)
tree8727403ddfdc51441db940ba77d2cce6cea3ec66 /src/modules/m_override.cpp
parenta6b53dbc3629eb329b5b77d81e81ced837d4dc66 (diff)
Rewrite invite system
- Moved out of core, now lives entirely in core_channel - Accessible using the provided API after including the appropriate header - Invites are stored in an extension attached to LocalUser/Channel objects, they no longer need special handling when destroying these objects or when lowering TS - Expiration of timed invites are implemented using Timers - When creating a new invite let a non-timed invite override a timed one
Diffstat (limited to 'src/modules/m_override.cpp')
-rw-r--r--src/modules/m_override.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 69f4b3bca..8bf1d3079 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -25,6 +25,7 @@
#include "inspircd.h"
+#include "modules/invite.h"
class ModuleOverride : public Module
{
@@ -34,6 +35,7 @@ class ModuleOverride : public Module
ChanModeReference inviteonly;
ChanModeReference key;
ChanModeReference limit;
+ Invite::API invapi;
static bool IsOverride(unsigned int userlevel, const Modes::ChangeList::List& list)
{
@@ -67,6 +69,7 @@ class ModuleOverride : public Module
, inviteonly(this, "inviteonly")
, key(this, "key")
, limit(this, "limit")
+ , invapi(this)
{
}
@@ -177,7 +180,7 @@ class ModuleOverride : public Module
{
if (chan->IsModeSet(inviteonly) && (CanOverride(user,"INVITE")))
{
- if (!user->IsInvited(chan))
+ if (!invapi->IsInvited(user, chan))
return HandleJoinOverride(user, chan, keygiven, "invite-only", "+i");
return MOD_RES_ALLOW;
}