From d2e189102b643f38418f3caf065dbb91f2ce4266 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 17 Jun 2012 17:53:39 +0200 Subject: Fix pending invites not being removed when a channel was deleted or had its TS lowered --- include/membership.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include/membership.h') diff --git a/include/membership.h b/include/membership.h index 281d04f70..340f92a12 100644 --- a/include/membership.h +++ b/include/membership.h @@ -35,4 +35,29 @@ class CoreExport Membership : public Extensible unsigned int getRank(); }; +class InviteBase +{ + protected: + InviteList invites; + + public: + void ClearInvites(); + + friend class Invitation; +}; + +class Invitation : public classbase +{ + Invitation(Channel* c, LocalUser* u, time_t timeout) : user(u), chan(c), expiry(timeout) {} + + public: + LocalUser* const user; + Channel* const chan; + time_t expiry; + + ~Invitation(); + static void Create(Channel* c, LocalUser* u, time_t timeout); + static Invitation* Find(Channel* c, LocalUser* u, bool check_expired = true); +}; + #endif -- cgit v1.2.3