summaryrefslogtreecommitdiff
path: root/include/membership.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2012-06-27 16:29:21 -0700
committerAttila Molnar <attilamolnar@hush.com>2012-06-27 16:29:21 -0700
commitf89e68d78684dab66f9c99aaf8bd8a37ec62bfce (patch)
treecdabc56abaf267f501308be387269bed655ac724 /include/membership.h
parentb1dedaba2400b7ce7acfa98b9a63fd54ae674a41 (diff)
parentd2e189102b643f38418f3caf065dbb91f2ce4266 (diff)
Merge pull request #235 from attilamolnar/insp20+invitefix
Diffstat (limited to 'include/membership.h')
-rw-r--r--include/membership.h25
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