Anope IRC Services  Version 2.0
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Private Attributes
ChanAccess Class Referenceabstract

#include <access.h>

Inheritance diagram for ChanAccess:
Inheritance graph
[legend]
Collaboration diagram for ChanAccess:
Collaboration graph
[legend]

Public Types

typedef std::multimap< const
ChanAccess *, const ChanAccess * > 
Set
 
typedef std::pair< Set, SetPath
 

Public Member Functions

 ChanAccess (AccessProvider *p)
 
virtual ~ChanAccess ()
 
void SetMask (const Anope::string &mask, ChannelInfo *ci)
 
const Anope::stringMask () const
 
NickCoreGetAccount () const
 
void Serialize (Serialize::Data &data) const anope_override
 
virtual bool Matches (const User *u, const NickCore *nc, Path &p) const
 
virtual bool HasPriv (const Anope::string &name) const =0
 
virtual Anope::string AccessSerialize () const =0
 
virtual void AccessUnserialize (const Anope::string &data)=0
 
virtual bool operator> (const ChanAccess &other) const
 
virtual bool operator< (const ChanAccess &other) const
 
bool operator>= (const ChanAccess &other) const
 
bool operator<= (const ChanAccess &other) const
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 
void QueueUpdate ()
 
bool IsCached (Serialize::Data &)
 
void UpdateCache (Serialize::Data &)
 
bool IsTSCached ()
 
void UpdateTS ()
 
Serialize::TypeGetSerializableType () const
 
- Public Member Functions inherited from Base
 Base ()
 
virtual ~Base ()
 
void AddReference (ReferenceBase *r)
 
void DelReference (ReferenceBase *r)
 

Static Public Member Functions

static SerializableUnserialize (Serializable *obj, Serialize::Data &)
 
- Static Public Member Functions inherited from Serializable
static const std::list
< Serializable * > & 
GetItems ()
 

Data Fields

AccessProviderprovider
 
Serialize::Reference< ChannelInfoci
 
Anope::string creator
 
time_t last_seen
 
time_t created
 
- Data Fields inherited from Serializable
uint64_t id
 
unsigned short redis_ignore
 

Private Attributes

Anope::string mask
 
Serialize::Reference< NickCorenc
 

Additional Inherited Members

- Protected Member Functions inherited from Serializable
 Serializable (const Anope::string &serialize_type)
 
 Serializable (const Serializable &)
 
Serializableoperator= (const Serializable &)
 

Detailed Description

Definition at line 75 of file access.h.

Member Typedef Documentation

typedef std::pair<Set, Set> ChanAccess::Path

Definition at line 87 of file access.h.

typedef std::multimap<const ChanAccess *, const ChanAccess *> ChanAccess::Set

Definition at line 82 of file access.h.

Constructor & Destructor Documentation

ChanAccess::ChanAccess ( AccessProvider p)

Definition at line 142 of file access.cpp.

ChanAccess::~ChanAccess ( )
virtual

Definition at line 146 of file access.cpp.

References ChannelInfo::Find(), mask, nc, and ChannelInfo::RemoveChannelReference().

Member Function Documentation

virtual Anope::string ChanAccess::AccessSerialize ( ) const
pure virtual
virtual void ChanAccess::AccessUnserialize ( const Anope::string data)
pure virtual

Unserialize this access entry from the given data. This data will be fetched from AccessSerialize.

Implemented in XOPChanAccess, AccessChanAccess, and FlagsChanAccess.

Referenced by ChannelInfo::ChannelInfo(), CommandCSClone::Execute(), LoadChannels(), and WebCPanel::ChanServ::Access::OnRequest().

NickCore * ChanAccess::GetAccount ( ) const

Definition at line 204 of file access.cpp.

References nc.

Referenced by CommandCSAccess::DoDel(), ChanServCore::OnDelCore(), and CommandSeen::SimpleSeen().

virtual bool ChanAccess::HasPriv ( const Anope::string name) const
pure virtual

Check if this access entry has the given privilege.

Parameters
nameThe privilege name

Implemented in AccessChanAccess, XOPChanAccess, and FlagsChanAccess.

Referenced by FlagsChanAccess::DetermineFlags(), XOPChanAccess::DetermineLevel(), HasPriv(), operator<(), and operator>().

const Anope::string & ChanAccess::Mask ( ) const
bool ChanAccess::Matches ( const User u,
const NickCore nc,
Path p 
) const
virtual

Check if this access entry matches the given user or account

Parameters
uThe user
ncThe account
pThe path to the access object which matches will be put here

Definition at line 254 of file access.cpp.

References NickCore::aliases, ChannelInfo::Find(), Anope::string::find_first_of(), ChannelInfo::GetAccess(), ChannelInfo::GetAccessCount(), User::GetDisplayedMask(), IRCD, IRCDProto::IsChannelValid(), mask, Anope::Match(), Matches(), nc, NickAlias::nick, User::nick, and Anope::string::npos.

Referenced by ChannelInfo::AccessFor(), ChannelInfo::GetDeepAccessCount(), Matches(), and CommandCSAccess::ProcessList().

bool ChanAccess::operator< ( const ChanAccess other) const
virtual

Reimplemented in AccessChanAccess.

Definition at line 324 of file access.cpp.

References PrivilegeManager::GetPrivileges(), HasPriv(), and name.

Referenced by AccessChanAccess::operator<().

bool ChanAccess::operator<= ( const ChanAccess other) const

Definition at line 346 of file access.cpp.

bool ChanAccess::operator> ( const ChanAccess other) const
virtual

Reimplemented in AccessChanAccess.

Definition at line 307 of file access.cpp.

References PrivilegeManager::GetPrivileges(), HasPriv(), and name.

Referenced by AccessChanAccess::operator>().

bool ChanAccess::operator>= ( const ChanAccess other) const

Definition at line 341 of file access.cpp.

void ChanAccess::Serialize ( Serialize::Data data) const
virtual
void ChanAccess::SetMask ( const Anope::string mask,
ChannelInfo ci 
)
Serializable * ChanAccess::Unserialize ( Serializable obj,
Serialize::Data data 
)
static

Field Documentation

time_t ChanAccess::created
Anope::string ChanAccess::creator
time_t ChanAccess::last_seen
Anope::string ChanAccess::mask
private

Definition at line 77 of file access.h.

Referenced by Mask(), Matches(), SetMask(), and ~ChanAccess().

Serialize::Reference<NickCore> ChanAccess::nc
private

Definition at line 79 of file access.h.

Referenced by GetAccount(), Mask(), Matches(), SetMask(), and ~ChanAccess().

AccessProvider* ChanAccess::provider

The documentation for this class was generated from the following files: