summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_override.cpp5
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp3
-rw-r--r--src/modules/m_uninvite.cpp8
3 files changed, 10 insertions, 6 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;
}
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index 687bf305e..0879e730a 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -272,9 +272,6 @@ void CommandFJoin::LowerTS(Channel* chan, time_t TS, const std::string& newname)
chan->name = newname;
chan->age = TS;
- // Remove all pending invites
- chan->ClearInvites();
-
// Clear all modes
CommandFJoin::RemoveStatus(chan);
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 97ad841f1..e92688d1d 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -21,13 +21,17 @@
#include "inspircd.h"
+#include "modules/invite.h"
/** Handle /UNINVITE
*/
class CommandUninvite : public Command
{
+ Invite::API invapi;
public:
- CommandUninvite(Module* Creator) : Command(Creator,"UNINVITE", 2)
+ CommandUninvite(Module* Creator)
+ : Command(Creator, "UNINVITE", 2)
+ , invapi(Creator)
{
syntax = "<nick> <channel>";
TRANSLATE2(TR_NICK, TR_TEXT);
@@ -73,7 +77,7 @@ class CommandUninvite : public Command
LocalUser* lu = IS_LOCAL(u);
if (lu)
{
- if (!lu->RemoveInvite(c))
+ if (!invapi->Remove(lu, c))
{
user->SendText(":%s 505 %s %s %s :Is not invited to channel %s", user->server->GetName().c_str(), user->nick.c_str(), u->nick.c_str(), c->name.c_str(), c->name.c_str());
return CMD_FAILURE;