aboutsummaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-24 02:58:46 +0000
committerGravatar Sadie Powell2023-01-24 02:58:46 +0000
commitf310e1c98dc262249146025ffffb81334b38680d (patch)
treeedd19152137e71db58efc5fbd289f34ce9b6919b /src/xline.cpp
parentClean up some remaining old format string stuff. (diff)
Refactor the caching methods in User and rename to make more sense.
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index 10ca2b95f..6cc44447f 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -576,8 +576,8 @@ void XLine::DefaultApply(User* u, const std::string& line, bool bancache)
if (bancache)
{
- ServerInstance->Logs.Debug("BANCACHE", "BanCache: Adding positive hit (" + line + ") for " + u->GetIPString());
- ServerInstance->BanCache.AddHit(u->GetIPString(), this->type, banReason, (this->duration > 0 ? (this->expiry - ServerInstance->Time()) : 0));
+ ServerInstance->Logs.Debug("BANCACHE", "BanCache: Adding positive hit (" + line + ") for " + u->GetAddress());
+ ServerInstance->BanCache.AddHit(u->GetAddress(), this->type, banReason, (this->duration > 0 ? (this->expiry - ServerInstance->Time()) : 0));
}
}
@@ -590,7 +590,7 @@ bool KLine::Matches(User* u)
if (InspIRCd::Match(u->ident, this->identmask, ascii_case_insensitive_map))
{
if (InspIRCd::MatchCIDR(u->GetRealHost(), this->hostmask, ascii_case_insensitive_map) ||
- InspIRCd::MatchCIDR(u->GetIPString(), this->hostmask, ascii_case_insensitive_map))
+ InspIRCd::MatchCIDR(u->GetAddress(), this->hostmask, ascii_case_insensitive_map))
{
return true;
}
@@ -613,7 +613,7 @@ bool GLine::Matches(User* u)
if (InspIRCd::Match(u->ident, this->identmask, ascii_case_insensitive_map))
{
if (InspIRCd::MatchCIDR(u->GetRealHost(), this->hostmask, ascii_case_insensitive_map) ||
- InspIRCd::MatchCIDR(u->GetIPString(), this->hostmask, ascii_case_insensitive_map))
+ InspIRCd::MatchCIDR(u->GetAddress(), this->hostmask, ascii_case_insensitive_map))
{
return true;
}
@@ -632,7 +632,7 @@ bool ELine::Matches(User* u)
if (InspIRCd::Match(u->ident, this->identmask, ascii_case_insensitive_map))
{
if (InspIRCd::MatchCIDR(u->GetRealHost(), this->hostmask, ascii_case_insensitive_map) ||
- InspIRCd::MatchCIDR(u->GetIPString(), this->hostmask, ascii_case_insensitive_map))
+ InspIRCd::MatchCIDR(u->GetAddress(), this->hostmask, ascii_case_insensitive_map))
{
return true;
}
@@ -647,7 +647,7 @@ bool ZLine::Matches(User* u)
if (lu && lu->exempt)
return false;
- return InspIRCd::MatchCIDR(u->GetIPString(), this->ipaddr);
+ return InspIRCd::MatchCIDR(u->GetAddress(), this->ipaddr);
}
void ZLine::Apply(User* u)