diff options
Diffstat (limited to 'include/membership.h')
-rw-r--r-- | include/membership.h | 39 |
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 |