Anope IRC Services  Version 2.0
Public Member Functions | Static Public Member Functions | Data Fields | Private Attributes
NickAlias Class Reference

#include <account.h>

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

Public Member Functions

 NickAlias (const Anope::string &nickname, NickCore *nickcore)
 
 ~NickAlias ()
 
void Serialize (Serialize::Data &data) const anope_override
 
void SetVhost (const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created=Anope::CurTime)
 
void RemoveVhost ()
 
bool HasVhost () const
 
const Anope::stringGetVhostIdent () const
 
const Anope::stringGetVhostHost () const
 
const Anope::stringGetVhostCreator () const
 
time_t GetVhostCreated () 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)
 
- Public Member Functions inherited from Extensible
virtual ~Extensible ()
 
template<typename T >
T * GetExt (const Anope::string &name) const
 
bool HasExt (const Anope::string &name) const
 
template<typename T >
T * Extend (const Anope::string &name, const T &what)
 
template<typename T >
T * Extend (const Anope::string &name)
 
template<typename T >
T * Require (const Anope::string &name)
 
template<typename T >
void Shrink (const Anope::string &name)
 
template<>
bool * Extend (const Anope::string &name, const bool &what)
 

Static Public Member Functions

static SerializableUnserialize (Serializable *obj, Serialize::Data &)
 
static NickAliasFind (const Anope::string &nick)
 
- Static Public Member Functions inherited from Serializable
static const std::list
< Serializable * > & 
GetItems ()
 
- Static Public Member Functions inherited from Extensible
static void ExtensibleSerialize (const Extensible *, const Serializable *, Serialize::Data &data)
 
static void ExtensibleUnserialize (Extensible *, Serializable *, Serialize::Data &data)
 

Data Fields

Anope::string nick
 
Anope::string last_quit
 
Anope::string last_realname
 
Anope::string last_usermask
 
Anope::string last_realhost
 
time_t time_registered
 
time_t last_seen
 
Serialize::Reference< NickCorenc
 
- Data Fields inherited from Serializable
uint64_t id
 
unsigned short redis_ignore
 
- Data Fields inherited from Extensible
std::set< ExtensibleBase * > extension_items
 

Private Attributes

Anope::string vhost_ident
 
Anope::string vhost_host
 
Anope::string vhost_creator
 
time_t vhost_created
 

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 31 of file account.h.

Constructor & Destructor Documentation

NickAlias::NickAlias ( const Anope::string nickname,
NickCore nickcore 
)

Constructor

Parameters
nicknameThe nick
nickcoreThe nickcore for this nick

Definition at line 24 of file nickalias.cpp.

References NickCore::aliases, Anope::CurTime, Anope::string::empty(), Oper::Find(), last_seen, LOG_DEBUG, nc, nick, NickAliasList, NickCore::o, and time_registered.

Referenced by Unserialize().

NickAlias::~NickAlias ( )

Definition at line 52 of file nickalias.cpp.

References Anope::string::equals_ci(), FOREACH_MOD, nc, nick, and NickAliasList.

Member Function Documentation

NickAlias * NickAlias::Find ( const Anope::string nick)
static

Finds a registered nick

Parameters
nickThe nick to lookup
Returns
the nick, if found

Definition at line 121 of file nickalias.cpp.

References NickAliasList.

Referenced by ChannelInfo::AccessFor(), User::ChangeNick(), Configuration::Conf::Conf(), CommandCSAKick::DoAdd(), CommandBSBot::DoAdd(), CommandCSAccess::DoAdd(), CommandCSXOP::DoAdd(), CommandBSBot::DoChange(), MyXMLRPCEvent::DoCommand(), CommandCSAKick::DoDel(), CommandCSXOP::DoDel(), CommandCSAccess::DoDel(), CommandMSSet::DoLimit(), CommandCSFlags::DoModify(), CSStats::DoStats(), CommandMSInfo::Execute(), CommandHSDel::Execute(), CommandNSUpdate::Execute(), CommandNSDrop::Execute(), CommandHSOff::Execute(), CommandNSGetPass::Execute(), CommandHSOn::Execute(), CommandHSSet::Execute(), CommandCSStatus::Execute(), CommandMSCancel::Execute(), CommandMSCheck::Execute(), CommandNSStatus::Execute(), CommandNSInfo::Execute(), CommandNSConfirm::Execute(), CommandNSResetPass::Execute(), CommandMSRSend::Execute(), CommandNSAList::Execute(), CommandHSGroup::Execute(), CommandHSDelAll::Execute(), CommandNSSuspend::Execute(), CommandNSIdentify::Execute(), CommandOSOper::Execute(), CommandNSGroup::Execute(), CommandHSRequest::Execute(), CommandNSAccess::Execute(), CommandOSInfo::Execute(), CommandNSRegister::Execute(), CommandHSSetAll::Execute(), CommandNSRecover::Execute(), CommandOSForbid::Execute(), CommandNSUnSuspend::Execute(), CommandNSSASetPassword::Execute(), CommandHSActivate::Execute(), CommandNSUngroup::Execute(), CommandNSAJoin::Execute(), CommandHSReject::Execute(), CommandNSCert::Execute(), CommandCSSetFounder::Execute(), CommandNSResend::Execute(), CommandNSGList::Execute(), CommandCSAccess::Execute(), CommandCSSetSuccessor::Execute(), CommandNSSASetNoexpire::Execute(), OperInfos::Find(), MemoInfo::GetMemoInfo(), Panel::GetNickFromSession(), User::IsIdentified(), User::IsRecognized(), LoadVHosts(), ENone::OnCheckAuthentication(), EOld::OnCheckAuthentication(), ESHA1::OnCheckAuthentication(), ESHA256::OnCheckAuthentication(), EMD5::OnCheckAuthentication(), EBCRYPT::OnCheckAuthentication(), NSIdentifyRequest::OnFail(), NSGroupRequest::OnFail(), SASL::IdentifyRequest::OnFail(), NSRecoverRequest::OnFail(), NSCert::OnFingerprint(), NSRegister::OnNickIdentify(), NickServCore::OnPostUserLogoff(), NSResetPass::OnPreCommand(), SQLAuthenticationResult::OnResult(), IdentifyInterface::OnResult(), NSIdentifyRequest::OnSuccess(), WebpanelRequest::OnSuccess(), NSGroupRequest::OnSuccess(), NSRecoverRequest::OnSuccess(), SASL::IdentifyRequest::OnSuccess(), NickServCore::OnUserConnect(), HostServCore::OnUserLogin(), NickServCore::OnUserLogin(), NickServCore::OnUserNickChange(), NickServCore::OnUserQuit(), req_send_memos(), rsend_notify(), CommandNSSetChanstats::Run(), CommandNSSetGreet::Run(), CommandNSSetMisc::Run(), Message::Stats::Run(), CommandNSSetHide::Run(), CommandNSSetPrivate::Run(), IRCDMessageEUID::Run(), CommandNSSetAutoOp::Run(), CommandNSSetDisplay::Run(), IRCDMessageNick::Run(), CommandNSSetEmail::Run(), IRCDMessageUID::Run(), CommandNSSetKeepModes::Run(), CommandNSSetKill::Run(), CommandNSSetLanguage::Run(), CommandNSSetMessage::Run(), CommandNSSetSecure::Run(), MemoServCore::Send(), ChanAccess::SetMask(), User::SetRealname(), CommandSeen::SimpleSeen(), NSSuspendInfo::Unserialize(), HostRequest::Unserialize(), User::UpdateHost(), NickServCore::Validate(), and AutoKick::~AutoKick().

time_t NickAlias::GetVhostCreated ( ) const

Retrieve when the vhost was created

Returns
the time it was created

Definition at line 116 of file nickalias.cpp.

References vhost_created.

Referenced by CommandHSList::Execute(), and Serialize().

const Anope::string & NickAlias::GetVhostCreator ( ) const

Retrieve the vhost creator

Returns
the creator

Definition at line 111 of file nickalias.cpp.

References vhost_creator.

Referenced by CommandHSList::Execute(), Serialize(), CommandHSGroup::Sync(), and CommandHSSetAll::Sync().

const Anope::string & NickAlias::GetVhostHost ( ) const
const Anope::string & NickAlias::GetVhostIdent ( ) const
bool NickAlias::HasVhost ( ) const
void NickAlias::RemoveVhost ( )

Remove a users vhost

Definition at line 88 of file nickalias.cpp.

References Anope::string::clear(), vhost_created, vhost_creator, vhost_host, and vhost_ident.

Referenced by CommandHSDel::Execute(), and CommandHSDelAll::Execute().

void NickAlias::Serialize ( Serialize::Data data) const
virtual
void NickAlias::SetVhost ( const Anope::string ident,
const Anope::string host,
const Anope::string creator,
time_t  created = Anope::CurTime 
)

Set a vhost for the user

Parameters
identThe ident
hostThe host
creatorWho created the vhost
timeWhen the vhost was craated

Definition at line 80 of file nickalias.cpp.

References vhost_created, vhost_creator, vhost_host, and vhost_ident.

Referenced by CommandHSSet::Execute(), CommandHSSetAll::Execute(), CommandHSActivate::Execute(), LoadVHosts(), CommandHSGroup::Sync(), and CommandHSSetAll::Sync().

Serializable * NickAlias::Unserialize ( Serializable obj,
Serialize::Data data 
)
static

Field Documentation

Anope::string NickAlias::last_quit
Anope::string NickAlias::last_realhost

Definition at line 43 of file account.h.

Referenced by CommandNSInfo::Execute(), User::Identify(), Serialize(), and User::UpdateHost().

Anope::string NickAlias::last_realname
time_t NickAlias::last_seen
Anope::string NickAlias::last_usermask

Definition at line 47 of file account.h.

Referenced by ChannelInfo::AccessFor(), WebCPanel::ChanServ::BuildChanList(), User::ChangeNick(), Configuration::Conf::Conf(), CommandCSAKick::DoAdd(), MyXMLRPCEvent::DoCommand(), CommandCSAKick::DoDel(), CommandMSSet::DoLimit(), CommandMSCancel::Execute(), CommandNSUpdate::Execute(), CommandCSStatus::Execute(), CommandMSCheck::Execute(), CommandMSInfo::Execute(), CommandNSList::Execute(), CommandHSOn::Execute(), CommandNSDrop::Execute(), CommandNSGetPass::Execute(), CommandNSInfo::Execute(), CommandNSStatus::Execute(), CommandNSConfirm::Execute(), CommandNSResetPass::Execute(), CommandMSRSend::Execute(), CommandNSAList::Execute(), CommandHSGroup::Execute(), CommandHSDelAll::Execute(), CommandNSSuspend::Execute(), CommandNSIdentify::Execute(), CommandOSOper::Execute(), CommandNSGroup::Execute(), CommandHSRequest::Execute(), CommandOSInfo::Execute(), CommandNSAccess::Execute(), CommandNSRegister::Execute(), CommandNSRecover::Execute(), CommandOSForbid::Execute(), CommandNSUnSuspend::Execute(), CommandNSSASetPassword::Execute(), CommandNSUngroup::Execute(), CommandNSAJoin::Execute(), CommandNSCert::Execute(), CommandCSSetFounder::Execute(), CommandNSResend::Execute(), CommandNSGList::Execute(), CommandCSAccess::Execute(), CommandCSSetSuccessor::Execute(), CommandNSSASetNoexpire::Execute(), OperInfos::Find(), MemoInfo::GetMemoInfo(), User::Identify(), User::IsIdentified(), User::IsRecognized(), NickAlias(), ENone::OnCheckAuthentication(), EOld::OnCheckAuthentication(), ESHA1::OnCheckAuthentication(), ESHA256::OnCheckAuthentication(), EMD5::OnCheckAuthentication(), EBCRYPT::OnCheckAuthentication(), NickServCore::OnExpireTick(), SASL::IdentifyRequest::OnFail(), NSCert::OnFingerprint(), NSSetMisc::OnNickInfo(), NSAccess::OnNickRegister(), MChanstats::OnNickRegister(), NSResetPass::OnPreCommand(), WebCPanel::ChanServ::Access::OnRequest(), WebCPanel::NickServ::Access::OnRequest(), WebCPanel::OperServ::Akill::OnRequest(), WebCPanel::ChanServ::Set::OnRequest(), WebCPanel::ChanServ::Modes::OnRequest(), WebCPanel::HostServ::Request::OnRequest(), WebCPanel::MemoServ::Memos::OnRequest(), WebCPanel::ChanServ::Akick::OnRequest(), WebCPanel::NickServ::Info::OnRequest(), WebCPanel::NickServ::Alist::OnRequest(), WebCPanel::NickServ::Cert::OnRequest(), WebCPanel::ChanServ::Drop::OnRequest(), WebPanelProtectedPage::OnRequest(), SQLAuthenticationResult::OnResult(), IdentifyInterface::OnResult(), NSIdentifyRequest::OnSuccess(), NSGroupRequest::OnSuccess(), NSRecoverRequest::OnSuccess(), SASL::IdentifyRequest::OnSuccess(), HostServCore::OnUserLogin(), NickServCore::OnUserLogin(), NickServCore::OnUserQuit(), rsend_notify(), CommandNSSetChanstats::Run(), CommandNSSetGreet::Run(), CommandNSSetMisc::Run(), CommandNSSetHide::Run(), CommandNSSetPrivate::Run(), IRCDMessageEUID::Run(), CommandNSSetAutoOp::Run(), CommandNSSetDisplay::Run(), IRCDMessageNick::Run(), CommandNSSetEmail::Run(), IRCDMessageUID::Run(), CommandNSSetKeepModes::Run(), CommandNSSetKill::Run(), CommandNSSetLanguage::Run(), CommandNSSetMessage::Run(), CommandNSSetSecure::Run(), MemoServCore::Send(), SendRegmail(), SendResetEmail(), Serialize(), NickCore::SetDisplay(), ChanAccess::SetMask(), CommandSeen::SimpleSeen(), CommandHSGroup::Sync(), CommandHSSetAll::Sync(), NickServCollide::Tick(), NSSuspendInfo::Unserialize(), User::UpdateHost(), NickServCore::Validate(), AutoKick::~AutoKick(), and ~NickAlias().

Anope::string NickAlias::nick
time_t NickAlias::time_registered
time_t NickAlias::vhost_created
private

Definition at line 34 of file account.h.

Referenced by GetVhostCreated(), RemoveVhost(), and SetVhost().

Anope::string NickAlias::vhost_creator
private

Definition at line 33 of file account.h.

Referenced by GetVhostCreator(), RemoveVhost(), SetVhost(), and Unserialize().

Anope::string NickAlias::vhost_host
private

Definition at line 33 of file account.h.

Referenced by GetVhostHost(), HasVhost(), RemoveVhost(), SetVhost(), and Unserialize().

Anope::string NickAlias::vhost_ident
private

Definition at line 33 of file account.h.

Referenced by GetVhostIdent(), RemoveVhost(), SetVhost(), and Unserialize().


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