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_uninvite.cpp | |
| parent | Move ServerConfig::InvBypassModes into core_channel (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_uninvite.cpp')
| -rw-r--r-- | src/modules/m_uninvite.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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; |
