Public Member Functions | Static Public Member Functions | Data Fields | Private Attributes

NickCore Class Reference

#include <account.h>

Inherits Serializable, and Extensible.

Collaboration diagram for NickCore:
Collaboration graph
[legend]

Public Member Functions

 NickCore (const Anope::string &nickdisplay)
 ~NickCore ()
void Serialize (Serialize::Data &data) const anope_override
void SetDisplay (const NickAlias *na)
virtual bool IsServicesOper () const
void AddAccess (const Anope::string &entry)
Anope::string GetAccess (unsigned entry) const
bool FindAccess (const Anope::string &entry)
void EraseAccess (const Anope::string &entry)
void ClearAccess ()
bool IsOnAccess (const User *u) const
void AddCert (const Anope::string &entry)
Anope::string GetCert (unsigned entry) const
bool FindCert (const Anope::string &entry) const
void EraseCert (const Anope::string &entry)
void ClearCert ()
void AddChannelReference (ChannelInfo *ci)
void RemoveChannelReference (ChannelInfo *ci)
void GetChannelReferences (std::deque< ChannelInfo * > &queue)

Static Public Member Functions

static SerializableUnserialize (Serializable *obj, Serialize::Data &)
static NickCoreFind (const Anope::string &nick)

Data Fields

Anope::string display
Anope::string pass
Anope::string email
Anope::string greet
Anope::string language
std::vector< Anope::stringaccess
std::vector< Anope::stringcert
MemoInfo memos
Serialize::Checker
< std::vector< NickAlias * > > 
aliases
Opero
uint16_t channelcount
time_t lastmail
std::list< User * > users

Private Attributes

Serialize::Checker< std::map
< ChannelInfo *, int > > 
chanaccess

Detailed Description

Definition at line 148 of file account.h.


Constructor & Destructor Documentation

NickCore::NickCore ( const Anope::string nickdisplay  ) 
NickCore::~NickCore (  ) 

Member Function Documentation

void NickCore::AddAccess ( const Anope::string entry  ) 

Add an entry to the nick's access list

Parameters:
entry The nick!ident entry to add to the access list

Adds a new entry into the access list.

Definition at line 164 of file nickcore.cpp.

References access, FOREACH_MOD, and I_OnNickAddAccess.

Referenced by CommandNSAccess::DoAdd(), CommandNSRegister::Execute(), and OnDatabaseReadMetadata().

void NickCore::AddCert ( const Anope::string entry  ) 

Add an entry to the nick's certificate list

Parameters:
entry The fingerprint to add to the cert list

Adds a new entry into the cert list.

Definition at line 220 of file nickcore.cpp.

References cert, FOREACH_MOD, and I_OnNickAddCert.

Referenced by CommandNSCert::DoAdd(), and OnDatabaseReadMetadata().

void NickCore::AddChannelReference ( ChannelInfo ci  ) 

Definition at line 259 of file nickcore.cpp.

References chanaccess.

Referenced by ChannelInfo::AddAkick().

void NickCore::ClearAccess (  ) 

Clears the entire nick's access list

Deletes all the memory allocated in the access list vector and then clears the vector.

Definition at line 197 of file nickcore.cpp.

References access, FOREACH_MOD, and I_OnNickClearAccess.

Referenced by ~NickCore().

void NickCore::ClearCert (  ) 

Clears the entire nick's cert list

Deletes all the memory allocated in the certificate list vector and then clears the vector.

Definition at line 253 of file nickcore.cpp.

References cert, FOREACH_MOD, and I_OnNickClearCert.

void NickCore::EraseAccess ( const Anope::string entry  ) 

Erase an entry from the nick's access list

Parameters:
entry The nick!ident entry to remove

Removes the specified access list entry from the access list.

Definition at line 186 of file nickcore.cpp.

References access, FOREACH_MOD, and I_OnNickEraseAccess.

Referenced by CommandNSAccess::DoDel().

void NickCore::EraseCert ( const Anope::string entry  ) 

Erase a fingerprint from the nick's certificate list

Parameters:
entry The fingerprint to remove

Removes the specified fingerprint from the cert list.

Definition at line 242 of file nickcore.cpp.

References cert, FOREACH_MOD, and I_OnNickEraseCert.

Referenced by CommandNSCert::DoDel().

NickCore * NickCore::Find ( const Anope::string nick  )  [static]
bool NickCore::FindAccess ( const Anope::string entry  ) 

Find an entry in the nick's access list

Parameters:
entry The nick!ident entry to search for
Returns:
True if the entry is found in the access list, false otherwise

Search for an entry within the access list.

Definition at line 177 of file nickcore.cpp.

References access.

Referenced by CommandNSAccess::DoAdd(), and CommandNSAccess::DoDel().

bool NickCore::FindCert ( const Anope::string entry  )  const

Find an entry in the nick's cert list

Parameters:
entry The fingerprint to search for
Returns:
True if the fingerprint is found in the cert list, false otherwise

Search for an fingerprint within the cert list.

Definition at line 233 of file nickcore.cpp.

References cert.

Referenced by CommandNSCert::DoAdd(), and CommandNSCert::DoDel().

Anope::string NickCore::GetAccess ( unsigned  entry  )  const

Get an entry from the nick's access list by index

Parameters:
entry Index in the access list vector to retrieve
Returns:
The access list entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds

Retrieves an entry from the access list corresponding to the given index.

Definition at line 170 of file nickcore.cpp.

References access.

Referenced by CommandNSAccess::DoList(), and IsOnAccess().

Anope::string NickCore::GetCert ( unsigned  entry  )  const

Get an entry from the nick's cert list by index

Parameters:
entry Index in the certificaate list vector to retrieve
Returns:
The fingerprint entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds

Retrieves an entry from the certificate list corresponding to the given index.

Definition at line 226 of file nickcore.cpp.

References cert.

Referenced by CommandNSCert::DoList(), and CommandNSCert::DoServAdminList().

void NickCore::GetChannelReferences ( std::deque< ChannelInfo * > &  queue  ) 

Definition at line 271 of file nickcore.cpp.

References chanaccess.

Referenced by CommandNSAList::Execute().

bool NickCore::IsOnAccess ( const User u  )  const

Is the given user on this accounts access list?

Parameters:
u The user
Returns:
true if the user is on the access list

Definition at line 203 of file nickcore.cpp.

References access, Anope::string::empty(), GetAccess(), User::GetCloakedHost(), User::GetIdent(), User::host, Anope::Match(), and User::vhost.

bool NickCore::IsServicesOper (  )  const [virtual]

Checks whether this account is a services oper or not.

Returns:
True if this account is a services oper, false otherwise.

Definition at line 159 of file nickcore.cpp.

References o.

Referenced by CommandNSSASetPassword::Execute(), CommandMSStaff::Execute(), ChanServCore::OnDelCore(), and CommandNSSetEmail::Run().

void NickCore::RemoveChannelReference ( ChannelInfo ci  ) 

Definition at line 264 of file nickcore.cpp.

References chanaccess.

void NickCore::Serialize ( Serialize::Data &  data  )  const
void NickCore::SetDisplay ( const NickAlias na  ) 

Changes the display for this account

Parameters:
na The new display, must be grouped to this account.

Definition at line 144 of file nickcore.cpp.

References display, FOREACH_MOD, I_OnChangeCoreDisplay, NickAlias::nc, NickAlias::nick, and NickCoreList.

Referenced by CommandNSUngroup::Execute().

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

Definition at line 88 of file nickcore.cpp.

References anope_dynamic_static_cast(), sepstream::GetToken(), and NickCore().

Referenced by Serialize::RegisterTypes().


Field Documentation

Serialize::Checker<std::map<ChannelInfo *, int> > NickCore::chanaccess [private]

Definition at line 154 of file account.h.

Referenced by Log::BuildPrefix(), CommandNSAJoin::DoAdd(), CommandNSAccess::DoAdd(), CommandNSAJoin::DoDel(), CommandNSAccess::DoDel(), XOPBase::DoDel(), CommandNSAJoin::DoList(), CommandNSAccess::DoList(), CommandNSCert::DoServAdminList(), MyXMLRPCEvent::DoUser(), CommandNSStatus::Execute(), CommandNSSASetPassword::Execute(), CommandNSGList::Execute(), CommandNSUngroup::Execute(), CommandNSGetEMail::Execute(), CommandNSAList::Execute(), CommandNSAccess::Execute(), CommandMSStaff::Execute(), CommandMSSendAll::Execute(), CommandHSDelAll::Execute(), CommandCSSetSuccessor::Execute(), CommandCSSetFounder::Execute(), CommandCSRegister::Execute(), CommandCSInfo::Execute(), CommandCSDrop::Execute(), MChanstats::GetDisplay(), MemoInfo::HasIgnore(), LoadNickCore(), LoadNicks(), NickCore(), ChanServCore::OnDelCore(), WebCPanel::ChanServ::Set::OnRequest(), IdentifyInterface::OnResult(), OnIdentifyInterface::OnResult(), DBPlain::OnSaveDatabase(), NSRecoverRequest::OnSuccess(), NSIdentifyRequest::OnSuccess(), rsend_notify(), IRCDMessageMetadata::Run(), CommandNSSetMisc::Run(), CommandNSSetSecure::Run(), CommandNSSetPrivate::Run(), CommandNSSetMessage::Run(), CommandNSSetKill::Run(), CommandNSSetHide::Run(), CommandNSSetGreet::Run(), CommandNSSetEmail::Run(), CommandNSSetAutoOp::Run(), Mail::Send(), UnrealIRCdProto::SendLogin(), HybridProto::SendLogin(), SendMemoMail(), Serialize(), SetDisplay(), ExpireCallback::Tick(), MyOper::Unserialize(), and ~NickCore().

Definition at line 182 of file account.h.

Referenced by NickCore(), and Mail::Send().

std::list<User *> NickCore::users

Definition at line 184 of file account.h.

Referenced by CommandOSOper::Execute(), User::Login(), and ~NickCore().


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