Anope IRC Services
Version 2.0
|
#include <access.h>
Public Types | |
typedef std::multimap< const ChanAccess *, const ChanAccess * > | Set |
typedef std::pair< Set, Set > | Path |
Public Member Functions | |
ChanAccess (AccessProvider *p) | |
virtual | ~ChanAccess () |
void | SetMask (const Anope::string &mask, ChannelInfo *ci) |
const Anope::string & | Mask () const |
NickCore * | GetAccount () 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 |
![]() | |
virtual | ~Serializable () |
void | QueueUpdate () |
bool | IsCached (Serialize::Data &) |
void | UpdateCache (Serialize::Data &) |
bool | IsTSCached () |
void | UpdateTS () |
Serialize::Type * | GetSerializableType () const |
![]() | |
Base () | |
virtual | ~Base () |
void | AddReference (ReferenceBase *r) |
void | DelReference (ReferenceBase *r) |
Static Public Member Functions | |
static Serializable * | Unserialize (Serializable *obj, Serialize::Data &) |
![]() | |
static const std::list < Serializable * > & | GetItems () |
Data Fields | |
AccessProvider * | provider |
Serialize::Reference< ChannelInfo > | ci |
Anope::string | creator |
time_t | last_seen |
time_t | created |
![]() | |
uint64_t | id |
unsigned short | redis_ignore |
Private Attributes | |
Anope::string | mask |
Serialize::Reference< NickCore > | nc |
Additional Inherited Members | |
![]() | |
Serializable (const Anope::string &serialize_type) | |
Serializable (const Serializable &) | |
Serializable & | operator= (const Serializable &) |
typedef std::pair<Set, Set> ChanAccess::Path |
typedef std::multimap<const ChanAccess *, const ChanAccess *> ChanAccess::Set |
ChanAccess::ChanAccess | ( | AccessProvider * | p | ) |
Definition at line 142 of file access.cpp.
|
virtual |
Definition at line 146 of file access.cpp.
References ChannelInfo::Find(), mask, nc, and ChannelInfo::RemoveChannelReference().
|
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 XOPChanAccess, AccessChanAccess, and FlagsChanAccess.
Referenced by ChannelInfo::ChannelInfo(), FlagsChanAccess::DetermineFlags(), CommandCSXOP::DoClear(), CommandCSXOP::DoDel(), CommandCSXOP::DoList(), CommandCSStatus::Execute(), CommandCSClone::Execute(), WebCPanel::ChanServ::Access::OnRequest(), CommandCSAccess::ProcessList(), and Serialize().
|
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().
|
pure virtual |
Check if this access entry has the given privilege.
name | The privilege name |
Implemented in AccessChanAccess, XOPChanAccess, and FlagsChanAccess.
Referenced by FlagsChanAccess::DetermineFlags(), XOPChanAccess::DetermineLevel(), HasPriv(), operator<(), and operator>().
const Anope::string & ChanAccess::Mask | ( | ) | const |
Definition at line 196 of file access.cpp.
Referenced by ChannelInfo::ChannelInfo(), CommandCSAccess::DoAdd(), CommandCSXOP::DoAdd(), CommandCSXOP::DoDel(), CommandCSAccess::DoDel(), CommandCSFlags::DoList(), CommandCSXOP::DoList(), CommandCSFlags::DoModify(), CommandCSStatus::Execute(), CommandCSClone::Execute(), ChanServCore::OnDelChan(), WebCPanel::ChanServ::Access::OnRequest(), CommandCSAccess::ProcessList(), and Serialize().
Check if this access entry matches the given user or account
u | The user |
nc | The account |
p | The 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().
|
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.
|
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.
|
virtual |
Implements Serializable.
Definition at line 209 of file access.cpp.
References AccessSerialize(), created, creator, Serialize::Data::DT_INT, last_seen, Mask(), Service::name, provider, and Serialize::Data::SetType().
void ChanAccess::SetMask | ( | const Anope::string & | mask, |
ChannelInfo * | ci | ||
) |
Definition at line 165 of file access.cpp.
References ChannelInfo::AddChannelReference(), Anope::string::clear(), Anope::string::empty(), NickAlias::Find(), ChannelInfo::Find(), mask, NickAlias::nc, nc, and ChannelInfo::RemoveChannelReference().
Referenced by ChannelInfo::ChannelInfo(), CommandCSAccess::DoAdd(), CommandCSXOP::DoAdd(), CommandCSFlags::DoModify(), CommandCSClone::Execute(), LoadChannels(), and WebCPanel::ChanServ::Access::OnRequest().
|
static |
Definition at line 220 of file access.cpp.
References ChannelInfo::AddAccess(), anope_dynamic_static_cast(), ci, AccessProvider::Create(), ChannelInfo::Find(), and provider.
Referenced by Serialize::RegisterTypes().
Serialize::Reference<ChannelInfo> ChanAccess::ci |
Definition at line 92 of file access.h.
Referenced by CommandCSAccess::DoAdd(), CommandCSXOP::DoAdd(), CommandCSXOP::DoDel(), LoadChannels(), and Unserialize().
time_t ChanAccess::created |
Definition at line 95 of file access.h.
Referenced by ChannelInfo::ChannelInfo(), CommandCSAccess::DoAdd(), CommandCSXOP::DoAdd(), CommandCSFlags::DoList(), CommandCSFlags::DoModify(), CommandCSClone::Execute(), LoadChannels(), WebCPanel::ChanServ::Access::OnRequest(), and Serialize().
Anope::string ChanAccess::creator |
Definition at line 93 of file access.h.
Referenced by ChannelInfo::ChannelInfo(), CommandCSAccess::DoAdd(), CommandCSXOP::DoAdd(), CommandCSFlags::DoList(), CommandCSFlags::DoModify(), CommandCSClone::Execute(), LoadChannels(), WebCPanel::ChanServ::Access::OnRequest(), CommandCSAccess::ProcessList(), and Serialize().
time_t ChanAccess::last_seen |
Definition at line 94 of file access.h.
Referenced by ChannelInfo::ChannelInfo(), CommandCSAccess::DoAdd(), CommandCSXOP::DoAdd(), CommandCSFlags::DoModify(), CommandCSClone::Execute(), LoadChannels(), WebCPanel::ChanServ::Access::OnRequest(), CommandCSAccess::ProcessList(), Serialize(), and CommandSeen::SimpleSeen().
|
private |
|
private |
Definition at line 79 of file access.h.
Referenced by GetAccount(), Mask(), Matches(), SetMask(), and ~ChanAccess().
AccessProvider* ChanAccess::provider |
Definition at line 90 of file access.h.
Referenced by ChannelInfo::ChannelInfo(), FlagsChanAccess::DetermineFlags(), XOPChanAccess::DetermineLevel(), CommandCSXOP::DoClear(), CommandCSXOP::DoDel(), CommandCSXOP::DoList(), CommandCSFlags::DoModify(), CommandCSClone::Execute(), AccessChanAccess::operator<(), AccessChanAccess::operator>(), Serialize(), and Unserialize().