]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/membership.h
Rewrote sepstream and tokenstream to be less ugly
[user/henk/code/inspircd.git] / include / membership.h
index 281d04f70ba1818366416b77d2aee32ad1e99d3d..5850e0ae0d8e265d46f8bd48e94fa5ecff16048c 100644 (file)
@@ -17,8 +17,7 @@
  */
 
 
-#ifndef MEMBERSHIP_H
-#define MEMBERSHIP_H
+#pragma once
 
 class CoreExport Membership : public Extensible
 {
@@ -35,4 +34,27 @@ class CoreExport Membership : public Extensible
        unsigned int getRank();
 };
 
-#endif
+class CoreExport InviteBase
+{
+ protected:
+       InviteList invites;
+
+ public:
+       void ClearInvites();
+
+       friend class Invitation;
+};
+
+class CoreExport 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);
+};