diff options
| author | 2015-11-02 13:28:55 +0100 | |
|---|---|---|
| committer | 2015-11-02 13:28:55 +0100 | |
| commit | 30fc51c6ddca487a1b89da9ab0ab59da003aee36 (patch) | |
| tree | 8727403ddfdc51441db940ba77d2cce6cea3ec66 /src/modules/m_override.cpp | |
| parent | Move ServerConfig::InvBypassModes into core_channel (diff) | |
| download | inspircd++-30fc51c6ddca487a1b89da9ab0ab59da003aee36.tar.gz inspircd++-30fc51c6ddca487a1b89da9ab0ab59da003aee36.tar.bz2 inspircd++-30fc51c6ddca487a1b89da9ab0ab59da003aee36.zip | |
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.cpp | 5 |
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; } |
