aboutsummaryrefslogtreecommitdiff
path: root/modules/geoban.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-27 13:10:26 +0000
committerGravatar Sadie Powell2026-03-27 13:10:26 +0000
commitcbdcd051c63c4ff98dfb4ff45388e722f8d0a2de (patch)
treef2c61a977edce634fc28b9dead3d8bfa5782211c /modules/geoban.cpp
parentMove CUList to be declared inside User. (diff)
Switch the extensible system to using shared pointers.
Diffstat (limited to 'modules/geoban.cpp')
-rw-r--r--modules/geoban.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/geoban.cpp b/modules/geoban.cpp
index 125a522b1..ff64bcf6c 100644
--- a/modules/geoban.cpp
+++ b/modules/geoban.cpp
@@ -39,7 +39,7 @@ public:
bool IsMatch(ListModeBase* lm, User* user, Channel* channel, const std::string& text, const ExtBan::MatchConfig& config) override
{
- Geolocation::Location* location = geoapi ? geoapi->GetLocation(user) : nullptr;
+ const auto location = geoapi ? geoapi->GetLocation(user) : nullptr;
const std::string code = location ? location->GetCode() : "XX";
// Does this user match against the ban?
@@ -71,7 +71,7 @@ public:
if (!request.flags['G'])
return MOD_RES_PASSTHRU;
- Geolocation::Location* location = geoapi ? geoapi->GetLocation(user) : nullptr;
+ const auto location = geoapi ? geoapi->GetLocation(user) : nullptr;
const std::string code = location ? location->GetCode() : "XX";
return InspIRCd::Match(code, request.matchtext, ascii_case_insensitive_map) ? MOD_RES_ALLOW : MOD_RES_DENY;
}
@@ -81,7 +81,7 @@ public:
if (whois.GetTarget()->server->IsService())
return;
- Geolocation::Location* location = geoapi ? geoapi->GetLocation(whois.GetTarget()) : nullptr;
+ const auto location = geoapi ? geoapi->GetLocation(whois.GetTarget()) : nullptr;
if (location)
whois.SendLine(RPL_WHOISCOUNTRY, location->GetCode(), "is connecting from " + location->GetName());
else