From cbdcd051c63c4ff98dfb4ff45388e722f8d0a2de Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 27 Mar 2026 13:10:26 +0000 Subject: Switch the extensible system to using shared pointers. --- modules/geoban.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/geoban.cpp') 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 -- cgit v1.3.1-10-gc9f91