diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-06-17 17:53:39 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-06-17 17:54:49 +0200 |
commit | d2e189102b643f38418f3caf065dbb91f2ce4266 (patch) | |
tree | 43968ec9501a525107e41736cbe39839aec08350 /include/membership.h | |
parent | f960a97cc6b509c756a20d892609825c67c2fc43 (diff) |
Fix pending invites not being removed when a channel was deleted or had its TS lowered
Diffstat (limited to 'include/membership.h')
-rw-r--r-- | include/membership.h | 25 |
1 files changed, 25 insertions, 0 deletions
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 |