2009-09-13 20:30:47 +00:00
|
|
|
/* +------------------------------------+
|
|
|
|
* | Inspire Internet Relay Chat Daemon |
|
|
|
|
* +------------------------------------+
|
|
|
|
*
|
2010-01-11 03:07:32 +00:00
|
|
|
* InspIRCd: (C) 2002-2010 InspIRCd Development Team
|
2009-09-13 20:30:47 +00:00
|
|
|
* See: http://wiki.inspircd.org/Credits
|
|
|
|
*
|
|
|
|
* This program is free but copyrighted software; see
|
|
|
|
* the file COPYING for details.
|
|
|
|
*
|
|
|
|
* ---------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2012-04-14 18:03:25 -07:00
|
|
|
#ifndef MEMBERSHIP_H
|
|
|
|
#define MEMBERSHIP_H
|
2009-09-13 20:30:47 +00:00
|
|
|
|
2009-10-24 20:03:53 +00:00
|
|
|
class CoreExport Membership : public Extensible
|
2009-09-13 20:30:47 +00:00
|
|
|
{
|
2009-10-24 20:03:53 +00:00
|
|
|
public:
|
2009-09-13 20:30:47 +00:00
|
|
|
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;
|
|
|
|
}
|
2009-09-13 20:31:11 +00:00
|
|
|
unsigned int getRank();
|
2009-09-13 20:30:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|