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

NickAlias Class Reference

#include <account.h>

Inherits Serializable, and Extensible.

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 Release ()
void OnCancel (User *u)
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

Static Public Member Functions

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

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

Private Attributes

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

Detailed Description

Definition at line 40 of file account.h.


Constructor & Destructor Documentation

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

Constructor

Parameters:
nickname The nick
nickcore The nickcore for this nick

Definition at line 24 of file nickalias.cpp.

References NickCore::aliases, Anope::CurTime, Anope::string::empty(), 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, I_OnDelNick, nc, nick, and NickAliasList.


Member Function Documentation

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

Finds a registered nick

Parameters:
nick The nick to lookup
Returns:
the nick, if found

Definition at line 229 of file nickalias.cpp.

References NickAliasList.

Referenced by XOPBase::DoAdd(), CommandCSAKick::DoAdd(), CommandCSAccess::DoAdd(), CommandBSBot::DoAdd(), NSCert::DoAutoIdentify(), CommandBSBot::DoChange(), MyXMLRPCEvent::DoCommand(), XOPBase::DoDel(), CommandCSAKick::DoDel(), CommandCSAccess::DoDel(), CommandMSSet::DoLimit(), CommandCSFlags::DoModify(), DoneOpers(), CSStats::DoStats(), CommandOSOper::Execute(), CommandOSForbid::Execute(), CommandNSUpdate::Execute(), CommandNSUnSuspend::Execute(), CommandNSSuspend::Execute(), CommandNSStatus::Execute(), CommandNSSASetNoexpire::Execute(), CommandNSSASetPassword::Execute(), CommandNSResetPass::Execute(), CommandNSResend::Execute(), CommandNSRegister::Execute(), CommandNSConfirm::Execute(), CommandNSRecover::Execute(), CommandNSInfo::Execute(), CommandNSIdentify::Execute(), CommandNSGList::Execute(), CommandNSUngroup::Execute(), CommandNSGroup::Execute(), CommandNSGetPass::Execute(), CommandNSDrop::Execute(), CommandNSCert::Execute(), CommandNSAList::Execute(), CommandNSAJoin::Execute(), CommandNSAccess::Execute(), CommandMSRSend::Execute(), CommandMSInfo::Execute(), CommandMSCheck::Execute(), CommandMSCancel::Execute(), CommandHSSetAll::Execute(), CommandHSSet::Execute(), CommandHSReject::Execute(), CommandHSActivate::Execute(), CommandHSRequest::Execute(), CommandHSOn::Execute(), CommandHSOff::Execute(), CommandHSGroup::Execute(), CommandHSDelAll::Execute(), CommandHSDel::Execute(), CommandCSStatus::Execute(), CommandCSSetSuccessor::Execute(), CommandCSSetFounder::Execute(), CommandCSAccess::Execute(), MemoInfo::GetMemoInfo(), Panel::GetNickFromSession(), LoadVHosts(), MyNickServService::Login(), NickAlias(), ESHA256::OnCheckAuthentication(), ESHA1::OnCheckAuthentication(), EOld::OnCheckAuthentication(), ENone::OnCheckAuthentication(), EMD5::OnCheckAuthentication(), NSRecoverRequest::OnFail(), NSIdentifyRequest::OnFail(), NSGroupRequest::OnFail(), NickServCore::OnNickIdentify(), HostServCore::OnNickIdentify(), NickServCore::OnPostUserLogoff(), NSResetPass::OnPreCommand(), SQLAuthenticationResult::OnResult(), IdentifyInterface::OnResult(), WebpanelRequest::OnSuccess(), NSRecoverRequest::OnSuccess(), NSIdentifyRequest::OnSuccess(), NSGroupRequest::OnSuccess(), NickServCore::OnUserConnect(), NickServCore::OnUserNickChange(), ReadDatabase(), Release(), req_send_memos(), rsend_notify(), Message::Stats::Run(), Message::Quit::Run(), IRCDMessageEncap::Run(), IRCDMessageMetadata::Run(), IRCDMessageUID::Run(), IRCDMessageNick::Run(), CommandNSSetMisc::Run(), CommandNSSetSecure::Run(), CommandNSSetPrivate::Run(), CommandNSSetMessage::Run(), CommandNSSetLanguage::Run(), CommandNSSetKill::Run(), CommandNSSetHide::Run(), CommandNSSetGreet::Run(), CommandNSSetEmail::Run(), CommandNSSetDisplay::Run(), CommandNSSetChanstats::Run(), CommandNSSetAutoOp::Run(), MyMemoServService::Send(), NickServCollide::Tick(), Unserialize(), HostRequest::Unserialize(), MyNickServService::Validate(), AutoKick::~AutoKick(), and ChanAccess::~ChanAccess().

time_t NickAlias::GetVhostCreated (  )  const

Retrieve when the vhost was created

Returns:
the time it was created

Definition at line 224 of file nickalias.cpp.

References vhost_created.

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

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

Retrieve the vhost creator

Returns:
the creator

Definition at line 219 of file nickalias.cpp.

References vhost_creator.

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

const Anope::string & NickAlias::GetVhostHost (  )  const
const Anope::string & NickAlias::GetVhostIdent (  )  const
bool NickAlias::HasVhost (  )  const
void NickAlias::OnCancel ( User u  ) 

This function is called when a user on this nick either disconnects or changes nick. Note that the user isnt necessarially identified to this nick See the comment in users.cpp

Parameters:
u The user

Definition at line 172 of file nickalias.cpp.

References IRCDProto::CanSVSHold, Config, Extensible::Extend(), Extensible::HasExt(), IRCD, nick, ServerConfig::NSReleaseTimeout, IRCDProto::SendSVSHold(), and Extensible::Shrink().

Referenced by NickServCore::OnPostUserLogoff(), and NickServCore::OnUserNickChange().

void NickAlias::Release (  ) 
void NickAlias::RemoveVhost (  ) 

Remove a users vhost

Definition at line 196 of file nickalias.cpp.

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

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

void NickAlias::Serialize ( Serialize::Data &  data  )  const
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:
ident The ident
host The host
creator Who created the vhost
time When the vhost was craated

Definition at line 188 of file nickalias.cpp.

References vhost_created, vhost_creator, vhost_host, and vhost_ident.

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

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

Field Documentation

Definition at line 56 of file account.h.

Referenced by ChannelInfo::AccessFor(), ChannelInfo::AddAccess(), User::ChangeNick(), CommandCSAKick::DoAdd(), NSCert::DoAutoIdentify(), MyXMLRPCEvent::DoCommand(), CommandCSAKick::DoDel(), CommandMSSet::DoLimit(), DoneOpers(), CommandOSOper::Execute(), CommandOSForbid::Execute(), CommandNSUpdate::Execute(), CommandNSUnSuspend::Execute(), CommandNSSuspend::Execute(), CommandNSStatus::Execute(), CommandNSSASetPassword::Execute(), CommandNSResetPass::Execute(), CommandNSResend::Execute(), CommandNSRegister::Execute(), CommandNSConfirm::Execute(), CommandNSRecover::Execute(), CommandNSList::Execute(), CommandNSInfo::Execute(), CommandNSIdentify::Execute(), CommandNSGList::Execute(), CommandNSUngroup::Execute(), CommandNSGroup::Execute(), CommandNSGetPass::Execute(), CommandNSDrop::Execute(), CommandNSCert::Execute(), CommandNSAList::Execute(), CommandNSAJoin::Execute(), CommandNSAccess::Execute(), CommandMSRSend::Execute(), CommandMSInfo::Execute(), CommandMSCheck::Execute(), CommandMSCancel::Execute(), CommandHSRequest::Execute(), CommandHSOn::Execute(), CommandHSGroup::Execute(), CommandHSDelAll::Execute(), CommandCSStatus::Execute(), CommandCSSetSuccessor::Execute(), CommandCSSetFounder::Execute(), CommandCSAccess::Execute(), MemoInfo::GetMemoInfo(), User::Identify(), User::IsIdentified(), User::IsRecognized(), User::KillInternal(), MyNickServService::Login(), NickAlias(), ESHA256::OnCheckAuthentication(), ESHA1::OnCheckAuthentication(), EOld::OnCheckAuthentication(), ENone::OnCheckAuthentication(), EMD5::OnCheckAuthentication(), NickServCore::OnNickIdentify(), NSResetPass::OnPreCommand(), WebPanelProtectedPage::OnRequest(), WebCPanel::OperServ::Akill::OnRequest(), WebCPanel::NickServ::Cert::OnRequest(), WebCPanel::NickServ::Alist::OnRequest(), WebCPanel::MemoServ::Memos::OnRequest(), WebCPanel::HostServ::Request::OnRequest(), WebCPanel::ChanServ::Set::OnRequest(), WebCPanel::NickServ::Info::OnRequest(), WebCPanel::ChanServ::Info::OnRequest(), WebCPanel::ChanServ::Drop::OnRequest(), WebCPanel::ChanServ::Akick::OnRequest(), WebCPanel::NickServ::Access::OnRequest(), WebCPanel::ChanServ::Access::OnRequest(), SQLAuthenticationResult::OnResult(), IdentifyInterface::OnResult(), DBPlain::OnSaveDatabase(), NSRecoverRequest::OnSuccess(), NSIdentifyRequest::OnSuccess(), NSGroupRequest::OnSuccess(), rsend_notify(), Message::Quit::Run(), IRCDMessageEncap::Run(), IRCDMessageMetadata::Run(), IRCDMessageNick::Run(), CommandNSSetMisc::Run(), CommandNSSetSecure::Run(), CommandNSSetPrivate::Run(), CommandNSSetMessage::Run(), CommandNSSetLanguage::Run(), CommandNSSetKill::Run(), CommandNSSetHide::Run(), CommandNSSetGreet::Run(), CommandNSSetEmail::Run(), CommandNSSetDisplay::Run(), CommandNSSetChanstats::Run(), CommandNSSetAutoOp::Run(), MyMemoServService::Send(), SendRegmail(), SendResetEmail(), Serialize(), NickCore::SetDisplay(), CommandHSSetAll::Sync(), CommandHSGroup::Sync(), ExpireCallback::Tick(), NickServCollide::Tick(), User::UpdateHost(), MyNickServService::Validate(), AutoKick::~AutoKick(), ChanAccess::~ChanAccess(), ~NickAlias(), and Server::~Server().

time_t NickAlias::vhost_created [private]

Definition at line 43 of file account.h.

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

Definition at line 42 of file account.h.

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

Definition at line 42 of file account.h.

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

Definition at line 42 of file account.h.

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


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