summaryrefslogtreecommitdiff
path: root/include/membership.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:30:47 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:30:47 +0000
commit91df762e93212958db487d8517addba1a63a4ddd (patch)
tree62ef9a5e926a0ba1dac698c742faf5908da400fb /include/membership.h
parent6d57bbe05c31c79eaad02fe81cfb9c1ed6b79c58 (diff)
Membership* changes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11697 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/membership.h')
-rw-r--r--include/membership.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/membership.h b/include/membership.h
new file mode 100644
index 000000000..95267915c
--- /dev/null
+++ b/include/membership.h
@@ -0,0 +1,39 @@
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
+ *
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
+#ifndef __MEMBERSHIP_H__
+#define __MEMBERSHIP_H__
+
+class User;
+class Channel;
+
+struct Membership : public Extensible
+{
+ User* const user;
+ Channel* const chan;
+ // mode list, sorted by prefix rank, higest first
+ std::string modes;
+ Membership(User* u, Channel* c) : user(u), chan(c) {}
+ inline bool hasMode(char m) const
+ {
+ return modes.find(m) != std::string::npos;
+ }
+};
+
+typedef std::map<User*, Membership*> UserMembList;
+typedef UserMembList::iterator UserMembIter;
+typedef UserMembList::const_iterator UserMembCIter;
+
+typedef std::set<User*> CUList;
+
+#endif