1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 19:16:38 +02:00

Use consistent casing when referring to vhosts and vidents.

This commit is contained in:
Sadie Powell
2024-03-15 12:42:13 +00:00
parent d996c3aa8f
commit 753119c4a1
27 changed files with 225 additions and 277 deletions
+17 -17
View File
@@ -76,7 +76,7 @@ NickAlias::~NickAlias()
NickAliasList->erase(this->nick);
}
void NickAlias::SetVhost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created)
void NickAlias::SetVHost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created)
{
this->vhost_ident = ident;
this->vhost_host = host;
@@ -84,7 +84,7 @@ void NickAlias::SetVhost(const Anope::string &ident, const Anope::string &host,
this->vhost_created = created;
}
void NickAlias::RemoveVhost()
void NickAlias::RemoveVHost()
{
this->vhost_ident.clear();
this->vhost_host.clear();
@@ -92,35 +92,35 @@ void NickAlias::RemoveVhost()
this->vhost_created = 0;
}
bool NickAlias::HasVhost() const
bool NickAlias::HasVHost() const
{
return !this->vhost_host.empty();
}
const Anope::string &NickAlias::GetVhostIdent() const
const Anope::string &NickAlias::GetVHostIdent() const
{
return this->vhost_ident;
}
const Anope::string &NickAlias::GetVhostHost() const
const Anope::string &NickAlias::GetVHostHost() const
{
return this->vhost_host;
}
Anope::string NickAlias::GetVhostMask() const
Anope::string NickAlias::GetVHostMask() const
{
if (this->GetVhostIdent().empty())
return this->GetVhostHost();
if (this->GetVHostIdent().empty())
return this->GetVHostHost();
return this->GetVhostIdent() + "@" + this->GetVhostHost();
return this->GetVHostIdent() + "@" + this->GetVHostHost();
}
const Anope::string &NickAlias::GetVhostCreator() const
const Anope::string &NickAlias::GetVHostCreator() const
{
return this->vhost_creator;
}
time_t NickAlias::GetVhostCreated() const
time_t NickAlias::GetVHostCreated() const
{
return this->vhost_created;
}
@@ -148,12 +148,12 @@ void NickAlias::Serialize(Serialize::Data &data) const
data.SetType("last_seen", Serialize::Data::DT_INT); data["last_seen"] << this->last_seen;
data["nc"] << this->nc->display;
if (this->HasVhost())
if (this->HasVHost())
{
data["vhost_ident"] << this->GetVhostIdent();
data["vhost_host"] << this->GetVhostHost();
data["vhost_creator"] << this->GetVhostCreator();
data["vhost_time"] << this->GetVhostCreated();
data["vhost_ident"] << this->GetVHostIdent();
data["vhost_host"] << this->GetVHostHost();
data["vhost_creator"] << this->GetVHostCreator();
data["vhost_time"] << this->GetVHostCreated();
}
Extensible::ExtensibleSerialize(this, this, data);
@@ -206,7 +206,7 @@ Serializable *NickAlias::Unserialize(Serializable *obj, Serialize::Data &data)
data["vhost_creator"] >> vhost_creator;
data["vhost_time"] >> vhost_time;
na->SetVhost(vhost_ident, vhost_host, vhost_creator, vhost_time);
na->SetVHost(vhost_ident, vhost_host, vhost_creator, vhost_time);
Extensible::ExtensibleUnserialize(na, na, data);