From 262ad80560b168da596a2c2874f07c9fe263bf35 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 22 Feb 2021 03:10:50 +0000 Subject: Add a human-readable serialiser to the geolocation extensible. --- src/modules/extra/m_geo_maxmind.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp index 2850e0501..6f5d4ef20 100644 --- a/src/modules/extra/m_geo_maxmind.cpp +++ b/src/modules/extra/m_geo_maxmind.cpp @@ -43,6 +43,12 @@ class GeolocationExtItem : public ExtensionItem { } + std::string ToHuman(const Extensible* container, void* item) const CXX11_OVERRIDE + { + Geolocation::Location* location = static_cast(item); + return location->GetName() + " [" + location->GetCode() + "]"; + } + void free(Extensible* container, void* item) CXX11_OVERRIDE { Geolocation::Location* old = static_cast(item); -- cgit v1.2.3