Public Member Functions | Static Public Member Functions | Data Fields

ChanAccess Class Reference

#include <access.h>

Inherits Serializable.

Inherited by AccessChanAccess, FlagsChanAccess, and XOPChanAccess.

Collaboration diagram for ChanAccess:
Collaboration graph
[legend]

Public Member Functions

 ChanAccess (AccessProvider *p)
virtual ~ChanAccess ()
void Serialize (Serialize::Data &data) const anope_override
virtual bool Matches (const User *u, const NickCore *nc) const
virtual bool HasPriv (const Anope::string &name) const =0
virtual Anope::string AccessSerialize () const =0
virtual void AccessUnserialize (const Anope::string &data)=0
bool operator> (const ChanAccess &other) const
bool operator< (const ChanAccess &other) const
bool operator>= (const ChanAccess &other) const
bool operator<= (const ChanAccess &other) const

Static Public Member Functions

static SerializableUnserialize (Serializable *obj, Serialize::Data &)

Data Fields

AccessProviderprovider
Serialize::Reference< ChannelInfoci
Anope::string mask
Anope::string creator
time_t last_seen
time_t created

Detailed Description

Definition at line 75 of file access.h.


Constructor & Destructor Documentation

ChanAccess::ChanAccess ( AccessProvider p  ) 

Definition at line 94 of file access.cpp.

ChanAccess::~ChanAccess (  )  [virtual]

Definition at line 98 of file access.cpp.

References ci, NickAlias::Find(), mask, and NickAlias::nc.


Member Function Documentation

virtual Anope::string ChanAccess::AccessSerialize (  )  const [pure virtual]

Serialize the access given by this access entry into a human readable form. chanserv/access will return a number, chanserv/xop will be AOP, SOP, etc.

Implemented in AccessChanAccess, FlagsChanAccess, and XOPChanAccess.

Referenced by ChannelInfo::ChannelInfo(), FlagsChanAccess::DetermineFlags(), CommandCSStatus::Execute(), CommandCSClone::Execute(), WebCPanel::ChanServ::Access::OnRequest(), DBPlain::OnSaveDatabase(), and Serialize().

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 AccessChanAccess, FlagsChanAccess, and XOPChanAccess.

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

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

Check if this access entry has the given privilege.

Parameters:
name The privilege name

Implemented in AccessChanAccess, FlagsChanAccess, and XOPChanAccess.

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

bool ChanAccess::Matches ( const User u,
const NickCore nc 
) const [virtual]

Check if this access entry matches the given user or account

Parameters:
u The user
nc The account

Definition at line 155 of file access.cpp.

References NickCore::aliases, Anope::string::find_first_of(), User::GetDisplayedMask(), mask, Anope::Match(), NickAlias::nick, User::nick, and Anope::string::npos.

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

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

Definition at line 191 of file access.cpp.

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

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

Definition at line 229 of file access.cpp.

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

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

Definition at line 172 of file access.cpp.

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

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

Definition at line 210 of file access.cpp.

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

void ChanAccess::Serialize ( Serialize::Data &  data  )  const [virtual]

Implements Serializable.

Definition at line 112 of file access.cpp.

References AccessSerialize(), ci, created, creator, last_seen, mask, Service::name, and provider.

Serializable * ChanAccess::Unserialize ( Serializable obj,
Serialize::Data &  data 
) [static]

Field Documentation


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